The “White Shores” Quote
Nope, you were right. The line that Gandalf uses in the movie (it’s during the siege of Gondor, when he and Pippin are having a quiet moment before the gate is broken through) is from the book, but it’s actually a description from Frodo’s point of view of arriving in Valinor. In the movie, it’s Gandalf describing death. Strange coincidence, tomorrow I’m actually doing a post about how sailing to Valinor is often treated like death by Tolkien (and, as is especially evident with the recycling of this quote, by Peter Jackson.)
The actual quote from the book, for those interested, is:
And the ship went out into the High Sea and passed on into the West, until at last on a night of rain Frodo smelled a sweet fragrance on the air and heard the sound of singing that came over the water. And then it seemed to him that as in his dream in the house of Bombadil, the grey rain-curtain turned all to silver glass and was rolled back, and he beheld white shores and beyond them a far green country under a swift sunrise.
In the book, Gandalf and Pippin don’t have this conversation about death at all. The timeline’s a little different - Pippin is serving Denethor up until he decides to burn himself and Faramir alive. Pippin finds Gandalf, and then they immediately go to save Faramir. There just isn’t that lull of free time for them to have any sort of deep conversation.