Richard Wagner's four opera cycle The Ring of the Nibelung was even more influential in the later 1800s and early 1900s than J.R.R. Tolkien's three volume The Lord of the Rings and its tremendous film adaptation were a century later.
But, Tolkien always pooh-poohed Wagner's influence on him: “Both rings are round and there the resemblance ceases.” Tolkien also argued that he read the medieval sagas in the original Icelandic, while Wagner read them in translations.
Still, consider the autobiography of Tolkien's close friend C.S. Lewis, Surprised by Joy, which includes a chapter on the vast impact Wagner had on young people of his generation. I found a talk given by a professor of German literature, Edward Haymes, that argues the case for substantial influence of The Ring on The Rings. One excerpt:
German nationalists of the early nineteenth century saw a Germanic equivalent of ancient Greek and Roman mythology in the so-called Nibelung legend. It was common at that time to refer to the Nibelungenlied as the “German Iliad.” Mendelssohn and others were urged by nationalist thinkers to write an opera on the Nibelung subject. The goal was to establish a cultural past that was equal to, if not superior to the Greek and Roman literature they had all grown up on and to make it a part of the popular consciousness. Wagner hoped that his use of Germanic myth would somehow tap into this racial memory and speak directly to the soul of the German people.
Parenthetically I might mention that Tolkien envisioned a very similar goal for his work. In a letter to a prospective publisher of the Silmarillion he wrote: “I was from the early days grieved by the poverty of my own beloved country: it had no stories of its own (bound up with its tongue and soil), not of the quality that I sought, and found (as an ingredient) in legends of other lands. There was Greek, and Celtic, and Romance, Germanic, Scandinavian, and Finnish (which greatly affected me) but nothing English, save impoverished chap-book stuff.” Tolkien shared with Wagner the desire of providing a mythology for his own people. Where Wagner found medieval sources for his myths, Tolkien had to invent his.
I would add to Prof. Haymes' well-informed analysis my own idle speculation that English v. German nationalist rivalries might have played a role in Tolkien's denigrating the impact of Wagner on him. Tolkien's hyper-Englishness might have something to do with having a German name. From Wikipedia:
The Tolkien family had their roots in Lower Saxony – the homeland of the original Anglo-Saxons – but had been living in England since the 18th century, becoming "quickly intensely English."
Moreover, Tolkien personally fought the German Empire in the Great War. The Battle of the Somme is the kind of thing that might leave a mark on a man's feelings.