The Lord of the Rings was a famous and influential work of fantasy literature written in the 20th century by British author J. R. R. Tolkien.
The Lord of the Rings was adapted into a highly-regarded trilogy of movies in the early 21st century. Gabrielle Howard was a fan of these films, in particular the character of Boromir. (TOS - Constellations short story: "Make-Believe")
During a visit to planet Vulcan in the year 2247, David Rabin compared the region called the Womb of Fire to "the land of Mordor," a primary setting in Tolkien's story. (TOS novel: Vulcan's Forge)
Bart Faulwell was familiar with the work and even tried using the word "Mellon" as a password for a sealed door. (SCE eBook: Ring Around the Sky; CoE eBook: Signs from Heaven)
The Silmarillion was a collection of stories set before the events of the series. In 2376, Prynn Tenmei read it to her mother Ruriko Tenmei as it was the elder Tenmei's favorite novel. (DS9 novel: Lesser Evil)