Looking at the Wikipedia entry for a musical 'earworm', http://en.wikipedia.org/wiki/Earworm,
I'm surprised by how many short stories there are that use the concept...for example:
In Alfred Bester's 1953 novel The Demolished Man, the protagonist uses a jingle specifically crafted to be a catchy, irritating nuisance as a tool to block mind readers from reading his mind.
And there are so many more:
In Fritz Leiber's Hugo Award-nominated short story "Rump-Titty-Titty-Tum-TAH-Tee" (1959), the title describes a rhythmic drumbeat so powerful that it rapidly spreads to all areas of human culture, until a counter-rhythm is developed that acts as an antidote.[22]
Great stuff.