I have to comment on this now instead of later!
As I've mentioned elsewhere, this chapter was my introduction to Tolkien, because my older brother gave me a vocal performance of it, reading it aloud to me at bed time. The events in the chapter changed Bilbo's life; I can honestly say that this moment in my own experience changed
my life. In discovering Tolkien, my imagination was baptized (to borrow a phrase from Lewis), and I have never looked back.
Part of what captured my imagination was the life and death aspect of this event; also, Gollum was deliciously scary and evil. On top of that, the riddling is enough to capture the interest of any young reader; it also awakened me to the realities of Anglo-Saxon poetry, which I was to discover only much later.
I (once upon a time) had Jared Lobdell's (edited) Tolkien Compass (now sadly lent and lost), in which the old and new versions are presented side by side. That was a fascinating read! And I'm so glad Tolkien revised it for the sake of LotR. From memory, the main difference in the original version is that Gollum keeps his word, and leads Bilbo out of the depths of the mountain. I don't remember, but it's almost like Gollum wishes him luck, like in some Grimm's Fairy Tale! The edge of one's seat intensity of the revised version is much better, and allows for the eucatastrophe of Bilbo's change of heart, choosing not to kill Gollum out of pity. Very important and very moving.
Was Bilbo foolish? Well, yes, but it was really naiveté, wasn't it? It highlighted how immature and childish he still was at this point, which only heightened the impact of the very mature pitying of Gollum at the end of the chapter, not to mention the exceedingly deft handling of political turmoils between Thorin and the army that wanted a share in the spoils of Smaug's death.
The fact that Gollum and Bilbo riddle back and forth to each other shows their kinship, however remote. Their minds are not dissimilar; thus, we have a clue that Bilbo does have the potential to become a second Gollum!

But that is maybe hindsight only. Or is it?