John Rateliff gives A Brief History of Tolkien roleplaying games, which includes a brief history of D&D and its influences -- many of which are obscure to newer players:
The original D&D was clearly based in equal parts on JRRT & on Rbt E. Howard's Conan stories,[1] with a magic system inspired by Jack Vance (The Dying Earth) and John Bellairs (The Face in the Frost) and an attitude copped from Fritz Leiber's Fafhrd & the Grey Mouser series, w. bits of Pratt & de Camp's Incomplete Enchanter, Poul Anderson's Three Hearts and Three Lions, and various pulp stalwarts thrown in. Most of these influences were openly acknowledged, both then and later—see, for example, the final appendix in the 1979 Dungeon Masters Guide, 'Appendix N: Inspirational and Educational Reading' (DMG page 224)—which makes it odd that the profound influence of Tolkien on D&D is generally overlooked and downplayed. This was certainly not the case in the dawn of roleplaying, as we'll see in a minute.