Goblin Town: The Original Megadungeon
I'm not as well-read in pre-Tolkien fantasy as some in this corner of the blogosphere so I can't speak for earlier works by other authors. But as far as I know, The Hobbit (and this chapter in particular) contain the first occurrences of that classic D&D trope: megadungeons! This passage is particularly striking:
There are strange things living in the pools and lakes in the hearts of mountains: fish whose fathers swam in, goodness only knows how many years ago, and never swam out again, while their eyes grew bigger and bigger and bigger from trying to see in the blackness; also there are other things more slimy than fish. Even in the tunnels and caves the goblins have made for themselves there are other things living unbeknown to them that have sneaked in from outside to lie up in the dark. Some of the caves, too, go back in their beginnings to ages before the goblins, who only widened them and joined them up with passages, and the original owners are still there in odd corners, slinking and nosing about.If that is not a perfect summary of the rationale behind Gygaxian megadungeons then I don't know what is. This subterranean ecology and layering of previous generations of development is captured nicely in Tony Dowler's How to Host a Dungeon. And the original MERP supplement Goblin-Gate and Eagle's Eyrie contains a wealth of maps speculating on the sprawling nature of this great megadungeon.