Well, but he did!
In "The Hobbit," Gollum is cunning, with a split personality that fluctuates between his Smeagol and Gollum personas. He is obsessed with the One Ring and is deceitful in his interactions with Bilbo Baggins.
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.
Bilbo asks Gollum "What's in my pocket" (the Ring) and Gollum cannot answer.
Bilbo wins when Gollum can not guess what is in his (Bilbo's) pockets
Bilbo finds himself in a cave after escaping the goblins. The cave is home to a creature who calls himself gollum. Gollum is in a mood because he has lost his precious(the ring in bilbo's pocket). Gollum challenges Bilbo to a riddles contest, if Bilbo loses Gollum gets to stew him in a pot and eat him. If Bilbo wins he gets to leave the cave uneaten. After a few riddles each bilbo realises Gollum is much better than himself, so cheats by asking "what is in my pocket?" When he faails to find the answer bilbo uses the ring to vanish from sight and escape.
Considering that he tries to kill and eat Bilbo in "The Hobbit" and hates Frodo and Sam merely because they are related to Bilbo, I'd say that Gollum doesn't like Bilbo.
Gollum misunderstood him. Bilbo was saying 'I need more time.' Gollum heard 'time', which was the answer.
Pity stayed Bilbo's hand.
Gollum guesses that Bilbo has found his magic ring.
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.
In chapter 5 of The Hobbit by J.R.R. Tolkien, Bilbo escapes from the greedy hands of Gollum. When Gollum realizes that chasing Bilbo is futile, he shouts this last line at Bilbo: "Thief, thief, thief! Baggins! We hates it, we hates it, we hates it for ever!," thus calling Bilbo both 'Thief' and 'Baggins.'
Bilbo Baggins and Gollum first appeared in the hobbit.