There are many parallels between Middle-earth and our own Earth, including its geography, peoples, and to some extent its political arrangements. But there are two aspects that stand out in my mind as particularly salient in the comparison.
The first, in my perspective, is the notion of a paradise lost. Whether the Eden mythology, Camelot and the Arthurian legends, or simply the notion of the “good old days,” this is something that is evident in many cultures and at many times in the real world, and it’s certainly present in Tolkien’s fantasy world. The state of Elves and Men in the heart of the story is a mere shadow of their former glory, most of which having been lost through the folly of pride, under the influence of ultimate evil. The world is never as beautiful as it used to be, and there are many people who believe that to be true of the real world as well.
Secondly, I believe Tolkien draws a great deal from the real world when dealing with the nature of war, particularly from his personal perspective, given his life and times. His own experiences of the horrors of war were very real, and as always, history is written by the victors. In this way, it’s easy to see how a young Lieutenant in the trenches of World War I could come to see the enemy as ultimately evil. As a survivor of the Lost Generation, he no doubt delved the depths of sorrow that those who haven’t experienced this kind of war can only speculate at. By contrast, it’s also reasonable to imagine how the horrors of war can inspire in its survivors a certain joie de vivre, and the love of home and comfort and familiarity that we see in the Hobbits.
There is little doubt that much inspiration for the legendarium was taken from the various myths and legends of northern and western Europe, particularly the Norse and Scandinavian mythologies. Tolkien himself staunchly rejected comparisons between his works and the real world, but one can easily see how such profound experiences early in life would flavor one’s outlook, and affect one’s work over a lifetime.