Is that right, grandpa? How many centuries did it take for a Mongol ARMY to breach the wall?
CatsGuts is ignoring several situations involving China's Great Wall:
Did the Great Wall pose any sort of challenge to Genghis Khan's invasion force?
At the time of Genghis's Mongol invasion around 1211, the Great Wall was still mainly earthen ramparts which posed some issues to his cavalry mounted force. However, Genghis and his generals exploited the Juyongguan Pass which was a mountain pass that was not heavily defended. Though these forces posed a risk, they were overcome easily by Genghis horde who then flooded into southern China.
AND
As Mynameph says, the Great Wall as we know it is largely a creation of the Ming. However, he left out an even more important factor, namely that the Mongol conquests did not exist in a vacuum.
The conquests came at the end of a long period of what I will dub "central Asian ascendance" in East Asia (and elsewhere in many ways), which began roughly at the period of the collapse of the Tang. During the ensuing chaos, great swaths of norther China were taken by a central Asian group called the Khitans. The Song dynasty initially attempted to (re)conquer those regions, but were repulsed and, for reasons financial and political, the Song court decided that they weren't going to jeopardize the rest of China for the northern regions, which weren't particularly important anyway. This is the period called the "Northern Song".
However, a new group arose in modern day Manchuria called the Jurchen. The Song saw this as an opportunity to fulfill the old Chinese diplomatic tactic of "using barbarians to fight barbarians". Unfortunately for them, the Jurchen didn't stop at the Khitan territory, and far from gaining back their old provinces in the ensuing conflict the Jurchen took the whole of north China including the "heartland" of the Yellow River. When the Song dynasty regrouped in south China, it represented only about 60% of the Chinese population. this period is called the "Southern Song". I should note in all fairness that the real story is much more complicated and I gave a very Sinocentric presentation.
Now--and by "now" I mean "in about a century"--enter the Mongols. They did not conquer a united China, and the Jurchen had no real ability to garrison the fortifications that would be strengthened and consolidated during the Ming to become the Great Wall.
At least CatsGuts has delusions to keep itself warm at night.
