As a matter of fact, the idea of a flat Earth was never a common Christian teaching. Augustine spoke of a round and spherical Earth in his discussion of antipodes in the fifth century. Pope Sylvester II (who reigned in the year 1000) was an educated man who loved science he taught his students that the earth was round; in his spare time he could be found building spheres out of wood and then painting a map of the Earth on them.
A lot of ancient/medieval Christian scholars describe the earth being spherical, including Origen, Thomas Aquinas, Hildegard, and Bede. (They got this notion from people like Aristotle, Plato, Archimedes, and Ptolyemy who taught the same thing.) But the idea that Christians are "flat-earthers" persists.
'The Book of the Rewards of Life.' (Liber Vitae Meritorum) from the 12th century - it describes not only a spherical planet, but her idea of how the whole world works.
In the age of the Scholastics, in the latter half of the middle ages, the university as we know it was born, and the leaders of this movement, people like Thomas Aquinas and Albertus Magmus, wrote the textbooks that shaped the intellectual world - and they always described the earth as a sphere.
Remarkably, almost every single important figure in antique/medieval Christianity described the earth as a sphere. The Greeks, who were able to estimate the shape - and even the measurements - of the earth, passed this knowledge to them, and the church never strayed from this ancient wisdom.
(Did anyone in older times deny that the earth was round? Yes. A few. About the same number of people currently think that the moon landing was faked.)
Where did we get the idea, then, that ancient people thought the earth was flat? It's hard to say where that rumor started, but those seeking to discredit the church have gladly latched onto this rumor. Unfortunately, it's a complete lie. Wikipedia has all of the relevant information here, but this quote from James Hannam says it all:
The myth that people in the Middle Ages thought the earth is flat appears to date from the 17th century...it gained currency in the 19th century, thanks to inaccurate histories such as John William Draper's History of the Conflict Between Religion and Science (1874) and Andrew Dickson White's History of the Warfare of Science with Theology in Christendom (1896). Atheists and agnostics championed the conflict thesis for their own purposes, but historical research gradually demonstrated that Draper and White had propagated more fantasy than fact in their efforts to prove that science and religion are locked in eternal conflict.