I always thought of it as more of a cough--specifically, that he was choking on the word "alone." After he'd been driven from the community of riverfolk, he was by himself for what...500 years? Unless he kept up a constant babble of conversation with himself (which he did, later on, didn't he?) his voice would have become bone-dry and ragged from neglect. And the word "alone" just fits him. My 2c, naturally.
That’s very clever and fitting; but I do remember that Tolkien explained it as a swallowing sound.
If you Google this:
“the name gollum” swallowing
...you’ll see a lot of citations. Check this:
http://greenbooks.theonering.net/questions/files/090100.html