They are both hobbits, or at least Gollum was closely related. They were both used by the ring. They both lose a bit of their souls to the ring. And the ring gives them both unusual longevity. Gollum and Bilbo also appear to speak a similar dialect, or at least know the same language enough to communicate.
Chat with our AI personalities
Bilbo said, talking to himself, "what have i got in my pocket?" (it was the Ring). Gollum thought it was a riddle and Bilbo decided to make it one. he gave Gollum three chances to guess and gollum lost after four. then gollum went "to get something" (it was the ring), and Bilbo thought he was abandoned and left with the ring on. Gollum thought Bilbo knew the way out and he wanted to follow him, realizing Bilbo had the ring. Bilbo saw Gollum racing towards the gate and followed him to safety.
Because Bilbo won it in his game of riddles with Gollum.
Bilbo escaped from the cave in The Hobbit by using his wits and the magical ring he found earlier in the story. He put on the ring, rendering himself invisible, and slipped past Gollum, the creature guarding the exit. Bilbo then followed Gollum out of the cave and made his way back to the company of dwarves.
"It was pity that stayed Bilbo's blade." --Gandalf"Pity stayed his hand." Gollum was so pathetic that Bilbo didn't have the heart to harm him, especially as he (Bilbo) was invisible at the time.
1. Bilbo is alone with Gollum while exchanging riddles (Gollum wants to eat him) 2. Bilbo is alone with Smaug trying to think of clever riddle names 3. Bilbo is alone with the spiders fighting them by himself