The Movie: Gollum gives this riddle first:
What has roots as nobody sees,
Is taller than trees,
Up, up, up it goes!
And yet, never grows?
Bilbo answers this one quickly and easily: "the mountain" . His response is:
Thirty white horses on a red hill,
First they champ,
Then they stamp,
Then they stand still.
Gollum has to think for a little while, but he gets it eventually: "teeth."
It's actually kind of mean for Bilbo to call attention to teeth. It'd be like saying "legs" to somebody in a wheelchair.
Then it's his turn:
Voiceless it cries,
Wingless flutters,
Toothless bites,
Mouthless mutters.
"Just a minute," Bilbo mutters. He thinks for a moment, then sees ripples on the lake and gets his answer: "wind." He goes next:
A box without hinges, key, or lid,
Yet golden treasure inside is hid.
Gollum has to think about this for a good long while before he comes to the correct answer: "eggses." He laughs, makes a comment about how his grandmother taught him to suck eggs, then gives his riddle:
All things it devours,
Birds, beasts, trees, flowers,
Gnaws iron, bites steel,
Grinds hard stones to meal.
Bilbo doesn't know this one. He thinks long and hard about it, and is starting to despair, when Gollum says, "Time's up." That gives Bilbo the answer, however, and he triumphantly cries out, "Time! The answer is time!"
The Book: Gollum goes first:
What has roots as nobody sees,
Is taller than trees,
Up, up, up it goes,
And yet never grows?
Bilbo calls the riddle easy and guesses it right away.
"Was that it? Man, I should've put money on this."
All he can think about is the possibility of being eaten, so, the only riddle he can think of is one that involves eating:
Thirty white horses on a red hill,
First they champ,
Then they stamp,
Then they stand still.
Gollum gets it quickly, then asks his second:
Voiceless it cries,
Wingless flutters,
Toothless bites,
Mouthless mutters.
Bilbo's heard this one before, so has no trouble answering it. And, having gained a little confidence, thinks of a riddle that a nasty little underground creature would have some difficulty with.
An eye in a blue face
Saw an eye in a green face.
"That eye is like to this eye"
Said the first eye,
"But in low place
Not in high place."
Gollum has a hard time with this riddle, having forgotten many of the things that aren't a part of his underground life. He eventually thinks of his grandmother, whom he once lived with, and that gives him the answer: "sun on the daisies." Being reminded of life above ground makes him angry, so he tries a more difficult riddle next:
It cannot be seen, cannot be felt,
Cannot be heard, cannot be smelt,
It lies behind stars and under hills,
And empty holes it fills.
It comes first and follows after,
Ends life, kills laughter.
Once again, however, Bilbo Baggins has heard this one, and comes up with the answer quickly: "Dark." He can't think of a difficult riddle, so he asks an easy riddle to buy himself a little more time:
A box without hinges, key, or lid,
Yet golden treasure inside is hid.
This proves harder than Bilbo expected, however, and watches Gollum struggle to come up with an answer. Once again, Gollum thinks of his grandmother, and how he once taught her to suck eggs.
I'll bet he taught her to suck... no. No, I can't. I just can't say it.
That's his answer: "Eggses!" He's so flustered by this, that he poses his own easy riddle:
Alive without breath,
As cold as death;
Never thirsty, ever drinking,
All in mail never clinking.
Similar to Gollum's response to Bilbo's "easy" eggs riddle, however, Bilbo has more difficulty with this one than Gollum expects. It isn't until Gollum makes to get out of his boat, and accidentally scares a fish into jumping at Bilbo's feet, does the hobbit get the answer: "fish." Bilbo, once again in a hurry, gives another quick riddle:
No-legs lay on one-leg, two-legs sat near three-legs, four-legs got some.
Sure enough, Gollum gets it correct right away: "Fish on a little table, man at table sitting on a stool, the cat has the bones." He comes up with his last riddle:
This thing all things devours;
Birds, beasts, trees, flowers;
Gnaws iron, bites steel;
Grinds hard stones to meal;
Slays king, ruins town,
And beats high mountain down.
Bilbo is stumped. He can't think of this one at all. He grows frightened, and as Gollum gets out of his boat, he tries to ask for more time. However, he's so afraid that he can only manage to squeak out a word: "time!" By pure luck, he gets the answer right.
What difference does it make? The riddle game in the book is longer and more nuanced. It allows us to see into the minds of Gollum and Bilbo, and to understand each character a little better. The difficulty they have with riddles that the other thinks easy, for example, and how Bilbo tries to use a riddle that incorporates the above-ground world. The movie version lacks some of the detail that the book provides.
My Opinion: This is a necessary sacrifice when adapting a book into a movie. As much as I loved the scene, I would have gotten bored if the movie had included every riddle that was in the book. They had to pick and choose which ones to use, and I frankly think they made excellent choices. Some of the riddles they cut out were pretty good (like the "dark" one), but some were just baffling. Like that one about "no-legs laying on one-leg"? That one was just ridiculous! Nevertheless, though, I think Peter Jackson did a great job, and made some necessary changes in a way that kept this important scene largely intact.
That being said: what was up with the change about Gollum and his grandmother? In the book, he teaches her to suck eggs. In the movie, she teaches him. This is such an unimportant detail that I loathe to even mention it, but, I'm honestly just confused.
Why was it even worth changing?