I'm going to borrow from an expand on a previous answer a bit:
At the turn of the century, folks in the United States and United Kingdom expressed an interest in medievalism; it was a response to a number of different factors among all walks of life - increased literacy and publication of classics like L'Morte d'Arthur and La Chanson de Roland, medieval fairy tales aimed at children, class-based responses against increasing urbanization and industrialization of modern life, nouveau riche infatuation with symbols of traditional authority, military innovation and propaganda connected with World War I...
William Morris of the Arts and Crafts movement is a good starting point in many ways, because he was an important early figure in turn-of-the-century fantasy with his novels The Well at the World's End (1896), and his anti-industrial attitudes, the looking-back-on a medievalist setting with sort of rose-colored goggles had its echo in the works of Lord Dunsany, especially proto-Sword & Sorcery tales like "The Fortress Unvanquishable Save for Sacnoth" in The Sword of Welleran and Other Stories (1908) and eventually J. R. R. Tolkien's The Hobbit (1937) and The Lord of the Rings (1954-1955) - there are all authors who deliberately emphasized and ostracized the creep of industrialization, urbanization, and "modern life," praising the simpler ideals and slower life of rural English life (and in so doing, all set some precedents for early environmentalism); corresponding to this slightly were authors like Arthur Machen, who borrowed aspects of medieval legend and romance in stories like "The White People" (1904) and "The Bowmen" (1914).
But you have to contrast this "Romanticist" movement with works like Mark Twain's A Connecticut Yankee in King Arthur's Court (1889) and T. H. White's The Once And Future King (1958); these were no less fantastical, but much cynical (or if you like, humanist) in their portrayal of medieval life and society as something other than the "knight in shining armor" trope. And this reflected, to a degree, the real-life interest in the physical reality of medievalism.
In Chris Bishop's Medievalist Comics in the American Century, he looks at the theme of "medievalist" comics - taking as particular examples of close study Prince Valiant, Green Arrow, Conan the Barbarian, etc. as American comics seized on these "medieval" archetypes of knights, archers, and swordsmen as heroes in the 20th century, and on page 29 he notes:
By the time [William Randolph] Hearst had acquired the rights to publish Prince Valiant, he could already lay claim to a sizable collection of medieval objects. Hearst reputedly possessed the world's largest private collection of medieval armor, far outstripping his nearest rivals the industrialist Henry Ford and the banker Andrew Mellon.
Hearst was not interested in medievalism in the same way that Morris was - he was not casting back to a more romantic age as a refutation of industrialism, as much as he was enjoying the trappings of a traditional system whose elite status he had intruded upon with his new wealth. But it was a fascination with the trappings of the period that was shared across many different classes. For example, in Bashford Dean's Helmets and Body Armor in Modern Warfare - Dean was associated with the Metropolitan Museum of Art in New York City, and was a noted collector and cataloguer of arms and armor; his book, published during WWI, shows clearly how contemporary minds were struggling to come to terms with the change in technology and tactics - trench warfare really being a throwback to siege warfare, swords rapidly obsolete as side-arms but still present (as were bayonets), and in this book Dean focuses on the design and effectiveness of personal body armor, helmets, and shields, noting their forebears in medieval forms. There, Dean noted that Ford was a notable manufacturer of helmets for World War I, and writes on page 212:
Thus, in the summer of 1917, this helmet, after having been shown to the experts of several manufacturing concerns, who feared that it could not be made, was turned over to the Worcester Pressed Steel Company with directions to produce it in an experimental lot in 12 per cent manganese steel. Dies accordingly were prepared and every effort was made to deliver the helmets needed. Unfortunately, however, the dies which this firm employed were inadequately designed and in the end the only helmets produced were defective, having their sides wrinkled and their tops thinned out. Later, however, this helmet was shown to Messrs. Ford and Company of Detroit who declared that it could be pressed and pressed well without an important breakage of metal. Accordingly, this firm, received an order from the Ordnance Department, produced a set of experimental dies. On these, during the fall of 1918, a couple of thousand helmets were turned out. It may be mentioned that the principle upon which Messrs Ford and Company proceeded was quite similar to that which an armorer would have used in olden times, for the top of the helmet was pressed not as a final but as an earlier operation.
This was in the context of World War I - firearm technology had largely supplanted the sword and personal body armor in previous conflicts, but this was essentially one of the last gasps of the hallmark arms & armor of the medieval era, and if you look at the propaganda material generated (like Machen's "The Bowmen") there is a largely romantic callback to the image of the medieval knight as an icon of martial spirit and nobility - contrasted with the bloodiness and impersonal nature of modern warfare, with its deaths at increasingly long ranges by foes that could hardly see each other, and against which there was little to no practical defense; warfare that included not just bombs, but poison gas, and eventually flamethrowers and tanks. World War I was, in a lot of ways, the death of any pretense to chivalry - the U.S. Civil War could still see allusions to Arthurian myth and legend - Robert E. Lee was famously called "the realized King Arthur", but there was little romanticism in the Great War - which in part led, during the 1920s and 30s, to the desire to cast back to a (romantically) morally simpler period with more direct conflicts.
One of the ways these different conceptions of medievalism - the romanticization and the un-romanticization - came together was in the Society for Creative Anachronism (SCA) founded in 1966; this was a group that was largely inspired by the quasi-medieval aesthetic of fantasy authors like J. R. R. Tolkien and T. H. White, but wanted to actually experience something of it, which involved greater research and investment in practical skills and medieval history. You can read about more of the history of the SCA here, but their focus on the Middle Ages "as they ought to have been" shows how deeply the romanticized medieval aesthetic has penetrated in popular culture.
While fantasy never "went away," with many notable works in the 40s, 50s, and 60s, it was the paperback publication of The Lord of the Rings in 1965, the Ballantine Adult Fantasy series, and the paperback publication of Robert E. Howard in the late 60s which all contributed to a "boom" in fantasy novels and stories, as well as the creation of Dungeons & Dragons in 1974, that cemented the "medieval" aesthetic in contemporary fantasy - but this was not the Middle Ages as we know them from history, this was a fantasy medieval which often glossed over many of the realities of the period in favor of certain popular stereotypes, particularly with regards to film and television - you can see the influence of costumes and setting from Errol Flynn's Robin Hood (1938) on Disney's animated Robin Hood (1973), for example.