William Butler Yeats penned "The Second Coming" in 1919, at the end of the First World War (the "War to End All Wars," presumably). Mechanized warfare had come into its own, and Germany was subdued (temporarily). The Soviet Revolution was underway and civil wars/revolutions raged in Egypt, Estonia, and Latvia. Meanwhile, the Allies, having survived a war that killed over 9 million combatants and 7 million civilians--including the Armenian genocide--came home with their ideals and faiths shaken.
Scholars have long argued Yeats' intent with this classic poem, but it can easily be seen as prophetic. He recognizes that the something that holds humanity together has been severed. Some argue that it was the drop in religious conviction, but it could easily be our faith in one another (to be basically good), or even a reassuring belief that war is justified and deaths in war are meaningful. It's quite likely, though, that Yeats saw the unrest yet rampant in the world and saw World War I (and its legacy) as the beginning instead of the end.
1919 was, in fact, the beginning of the "anarchy" Yeats writes of. Adolf Hitler gave his first speech to the German Workers' Party in this year, and thus the year can be marked as the beginning of his rise to power, although most of us don't think of him as being influential until at least 1933. In Italy, 1919, Mussolini, on the rise to power, had transformed completely from socialist to fascist. The signs of the time, to anyone who was paying attention, were aptly summed up by "The best lack all conviction, while the worst / Are full of passionate intensity." The "best" during this period were too often disillusioned and emotionally lost, but the "worst" were seizing the moment, understanding that the disillusioned and lost would crave leaders who promised the revival of old values and economic prosperity.
Yeats' second stanza begins with "Surely some revelation is at hand," and he goes on to paint a picture of an ancient, powerful being, rather like the Sphinx, has been roused from "centuries of stony sleep" by "a rocking cradle." The feeling of this stanza is powerful in its expectation that something too horrible to imagine is about to happen. Yeats cannot know what it is, but he sees the signs. The rocking cradle is an image of seeming simplicity and innocence, suggesting that the signs he sees look innocent but are not; they are merely the beginning of something horrible: a "rough beast," whose "hour come round at last, / Slouches toward Bethlehem to be born."
He probably was not predicting World War II, specifically, but he could see that chaos had replaced order, and nothing good would come of it.