Symbolism, Imagery, Allegory
It may seem surprising that we find Thorin Oakenshield and Gollum similar. But hear us out! We think we can make our case. To start, both of them lost their homes long ago. Smaug destroyed Thorin's grandfather's kingdom under the Lonely Mountain many years prior, and Thorin barely managed to escape with his life. Similarly, while we don't know exactly how Gollum got under the Misty Mountains (in this book, at least), the narrator does refer to a time "long, long ago, before [Gollum] lost all his friends and was driven away, alone, and crept down, down, into the dark under the mountains" (5.22).
So, both Thorin and Gollum are homeless. And in their separation from home, they've both gotten obsessed with a single object that means a lot to them. Thorin's is the Arkenstone of Thrain, a giant diamond that "is worth more than a river of gold in itself, and to [Thorin] it is beyond price" (16.2). The stone belonged to Thorin's father, Thrain, and Thorin will do anything to get it back. For Thorin, the Arkenstone is a symbol of his family, and of his family's lost kingdom and greatness.
For Gollum, the thing he loves most in the world is his ring of invisibility. We find out that Gollum whispers, "My birthday-present!" about the ring "often […] in the endless dark days" (5.76). In other words, as Gollum crouches in the dark all by himself, the only company he has is this golden ring, which is more precious than anything to him. And calling it his "birthday-present" reminds him of a time when he actually got presents and had birthdays – a very long time before The Hobbit starts. So the ring is also a symbol of home to Gollum.
Both Thorin and Gollum are incredibly focused on these symbols of home. Thorin contemplates waging war on Bard and the Elvenking just to get his Arkenstone back. And Gollum swears eternal hatred on Bilbo for stealing "the only thing he had ever cared for, his precious" (5.121).
But Bilbo, who has his own comfortable hobbit-hole back under The Hill, doesn't seem to feel this intense desire for things. He happily hands the Arkenstone over to Bard to try and prevent war. And while he doesn't give the ring back to Gollum (and he'd probably get killed if he tried), he mainly just uses it to dodge "unpleasant callers" (19.29) at Bag-End – nothing too tricky. Bilbo gives the Elvenking a necklace of silver and diamonds because he feels bad for burgling the man's home. And Bilbo willingly takes only two small chests of treasure because that is "quite as much as [Bilbo] can manage" (18.37). Bilbo doesn't seem to be obsessed with wealth, perhaps because he's already a comfortable, well-off hobbit. He doesn't need polished symbols of home like the Arkenstone or the ring when he has a real home of his own to return to.