It's an understatement to say that Gary Gygax was disingenuous in acknowledging the debt Dungeons & Dragons owed to J.R.R. Tolkien's Middle-Earth tales. This point is not seriously in dispute, I think, by anyone, least of all me. Gary repeatedly, perhaps most famously in issue number 95 of Dragon (March 1985), claimed that the good professor's influence was "minimal." This claim seems, at first glance, very much at odds with reality, given that the early printings of OD&D included references to hobbits, ents, and Nazgûl, as well as many explicit mentions of Tolkien by name. In addition, I would argue quite forcefully that the two biggest and generally unacknowledged Tolkien inspirations to be found in D&D -- and, by extension, all fantasy since 1974 -- is the notion first of a "multiracial" world and second of the adventuring party. Neither one of these has any significant antecedents in the pulp fantasies of Appendix N, most of which depict human-only worlds in which lone adventurers (perhaps with a single companion) engage in feats of derring-do. If Tolkien had an influence that Gygax didn't cop to, it's in these two related areas that I see it most powerfully.
I think it's a mistake, as some have argued, to look for signs of Tolkien's influence in specific monsters, spells, or magic items. Gary was an omnivorous borrower of interesting ideas and he never denied cribbing some from Middle-Earth. But, given that, by my lights, Gygax very much misunderstood The Lord of the Rings -- which he described as "an allegory of the struggle of the
little common working folk of England against the threat of Hitler's Nazi evil" -- I can't take seriously the notion that D&D owes more to Tolkien than the two ideas I noted earlier. I think it's quite credible that Gygax was not lying when he says that including hobbits and ents and so forth was "a studied effort to capitalize on the then-current craze for Tolkien's literature."
The underlying ethos of D&D has absolutely nothing in common with that of The Lord of the Rings, unless one wishes to claim that the fact that they are both "fantasies" is sufficient to make such a claim. I think it's patently obvious that your typical D&D party, whose membership and very form certainly does derive from Tolkien, has far less in common with the Fellowship than with Conan or Elric or Fafhrd and the Gray Mouser. D&D, as it existed in its Gygaxian form, was a game of shady ne'er-do-wells on the make. Money, fame, and power are the goals of most adventurers, as they were for their pulp fantasy forebears. The worldview that animates D&D is not that of a Catholic academic engaged in an intricate act of sub-creation (and not "allegory," as Gygax mistakenly claims).
I'm frankly baffled as to how anyone, least of all anyone familiar with both Tolkien and Gygax, could seriously argue that there's any philosophical descent of one from the other. I readily concede -- and I think Gygax did too, when pressed on the matter -- that D&D took plenty of ideas from Middle-Earth, but then it borrowed equally heavily from dozens of other sources, including Greek mythology, fairy tales, Disney films, science fiction, and TV shows current at the time. In every case, these borrowings were bent and twisted to serve a pulp fantasy ethos that permeates the entire game. Again, I'd be willing to concede that, as time went on, that pulp fantasy ethos became less pronounced, even in Gygax's own later work on the game, but that does not change the fact, at its inception, the game was not about heroes engaged in an epic quest to save the world from evil so much as assorted malcontents looking for ways to keep their money bags full and their lives free from the tedium of ordinary life.
Philosophically, D&D owes far more to the pulps -- not just fantasy but also Westerns, detective fiction, and sci-fi -- than it does Tolkien. For polemical purposes, it's great to be able to argue that Gygax denied Tolkien had any influence on D&D and laugh and point as he tries to explain away the presence of hobbits and mithril. But I think it's a misrepresentation of Gygax's claim to argue in such a fashion. I don't believe his point was that he didn't find any inspiration in Tolkien's works, because he clearly did, but most of that inspiration was superficial, on par with including minotaurs, centaurs, and titans in the game. To me, this is obvious and not just because I'm a Gygax partisan. I genuinely feel that D&D only makes sense with pulp fantasy as its foundation, even if some of the structures built on top of it have their origins elsewhere.