An interesting question. The word "sympathy" literally means to "feel with"—that is, a sympathetic character is one the audience can see themselves in, and feel sorry for, when they see or read about them. Characters who are, at heart, good people can sometimes come across as unsympathetic; likewise, sometimes we sympathize with characters who are essentially villainous because we find them charming or funny (Shakespeare's Richard III comes to mind). Gollum is certainly not an evil character; we know that he has been corrupted by the power of the ring, which is all-encompassing. We also see that the way Frodo and Bilbo behave when they are wearing the ring is troubling, and this suggests early indications that they, too, could soon be behaving as Gollum does if exposed to the ring for a prolonged period of time. We also know that Gollum was once a hobbit-like creature. As such, the audience does see in him what Frodo or Bilbo could become if the One Ring is not destroyed.
That being said, while Gollum is theoretically deserving of our sympathy, he is generally not portrayed in a sympathetic way. Even the stories he tells of his life before the Ring do not endear us to the hobbit he once was. In Gollum, we see a character who does not deserve the fate that has been forced upon him, but also a character who was never as deserving or well-intentioned as either Bilbo or Frodo.