Gandalf: There is one other who knew Bilbo had the Ring. I looked everywhere for the creature Gollum, but the enemy found him first. I don't know how long they tortured him, but through the endless screams and inane babble, they discerned two words:
Gollum: Shire. Baggins!
Frodo: Shire? Baggins? But that would lead them here! Take it Gandalf! Take it!
Gandalf: No, Frodo.
Frodo: You must take it!
Gandalf: You cannot offer me this ring!
Frodo: I'm giving it to you!
Gandalf: Don't... tempt me Frodo! I dare not take it. Not even to keep it safe. Understand, Frodo. I would use this ring from a desire to do good... But through me, it would wield a power too great and terrible to imagine.
In Bilbo's house, Gandalf speaks of Gollum and the information he provided to the Ring Wraiths.