In a radio interview around 1981, Keith Richards said he wrote this song for his Dalmatian dog (female). Most people assumed he wrote it about Anita Pallenberg, the mother of his two kids. He ended his tumultuous relationship with her after a 17-year-old boy shot himself on their bed.
For those wondering about a source for the Dalmatian story, the book Old gods almost dead: the 40-year odyssey of the Rolling Stones
does cite a Keith Richards interview where Keith did say that the song is about his "constantly farting Dalmatian." However, lyrics like "Tell me those lies, let me think they're true" and "So how come I'm still in love with you?" cast some doubt on this claim. There was a great deal of controversy about the song and Anita Pallenberg's feelings in the matter, so Keith might have been trying to save face at this point.
There was a lot more to Anita Pallenberg than just a dead 17-year-old; Pallenberg was already an actress and model before she met Keith Richards. She was even part of Andy Warhol's Factory in New York, which sets the stage for scandalous behavior right there. Furthermore, she apparently dated Stones' guitarist Brian Jones prior to Richards, and in Richards' biography Life
, he says that she also had a fling with Stones' frontman Mick Jagger. But the consensus is that she had a good role as a Rolling Stones partner, like a more benevolent Yoko Ono (another ex-Warhol affiliate). Let's just say that with all the cross-accusations and denials plus multiple books making different claims, we may never get to the bottom of Pallenberg's relationship with Richards or the band.
And as to her estate groundskeeper (Scott Cantrell, the aforementioned 17-year-old), with whom she was also allegedly having an affair, here's an AOL News item as recent as 2010
which still doesn't give us any definitive answers. His death was ruled a flat suicide in 1980; Richards still rehashes the old Russian Roulette rumor anyway. Lots of mean things said back and forth in this story.