The Lord of the Rings

 was a book by J. R. R. Tolkien. I.M. Foreman had been reading The Lord of the Rings shortly before meeting the Eighth Doctor. She said that it was very long, but she liked the final line. When the Doctor mentioned travelling with someone named "Sam", Foreman was reminded of a character from Rings. The Doctor, for his part, was reminded that Fitz had been talking about Rings. (PROSE: Interference - Book One)

In Stockbridge, Andrew Harper asked Nyssa if the novel she was writing was like Lord of the Rings. (AUDIO: Autumn)

Astrolabus forced the Sixth Doctor to quote the book in The Cabinet of Astrolabus. (COMIC: Once Upon a Time Lord)

While working at a garden centre, Fitz had a conversation with a woman and convinced her that the character of Frodo had been named after a woman the author, J. R. R. Tolkien, had had a relationship with. (PROSE: The Taint)

Behind the scenes
Chip (in TV: New Earth) and the Eleventh Doctor (in HOMEVID: Meanwhile in the TARDIS) have been respectively compared to the Rings characters of Gollum by Rose Tyler and Gandalf by the Doctor himself. Though obvious real-world references to The Lord of the Rings, televised Doctor Who never explicitly makes the connection between these characters and either J. R. R. Tolkien's books or any of the film adaptations.