As well as inventing universities, professional lawyers, and the banking industry, the twelfth century invented fantasy.
Now in some ways fantasy is the oldest form of literature, larger-than-life people wandering through the landscape having adventures colored heavily by marvel and the supernatural. In the twelfth century, however, it took on a more specific form, one of knightly adventures, generally with a strong admixture of romance as well as sword fights. The authors were not describing their own society, but in presenting a larger-than-life version of that society they were able to comment on and critique it.
King Arthur stories as we know them were a twelfth-century invention, although the "complete" Arthur corpus was put together only in the fifteenth century, around the time the printing press was invented.
Modern fantasy was essentially invented in the late nineteenth and twentieth centuries, by people who were very familiar with the literature of the real Middle Ages (such as J.R.R. Tolkien or C.S. Lewis) and thought that modern times had lost something important in leaving medieval ideals and values behind.
I myself write fantasy, imbued with real medieval social history--but because it's fantasy, not historical fiction, I can be as anachronistic as I like. My Royal Wizard of Yurt series, which begins with A Bad Spell in Yurt, is set in something like what the nineteenth century would have been like if the Middle Ages had continued--with no New World to discover, no Protestant Reformation, no Enlightenment, no French Revolution, no Industrial Revolution, and, of course, magic.
(For more on my thoughts on religion in fantasy, click here.)
All but the last volume of the Royal Wizard of Yurt series are out of print as physical books (though available used), but they are now coming out as audio books, and all are available as ebooks on all the major e-tailers: iTunes, Kobo, B&N-Nook, and of course Amazon. amazon.com/author/cdalebrittain