One need not knowledge of the natural world in order to abandon the belief in a god, you're giving to much credit to science and not the rational thought that exists within everyone, and I use the term rational as in people rationalizing things, not that the disbelief in a god is any more rational than a belief in one even though my personal bias would have a tendency to lean towards this way of thinking.
Rationalism is based on knowledge and learning. People in the middle ages hadn't yet solved many of the mysteries of the planet and universe, therefore the rational answer to these elements were that they were simply the work of something beyond them.
This doesn't necessarily mean belief in a god, because you're right, there were millions of people back then who didn't believe in a deity. But they weren't necessarily atheists. Buddhists, Confucianists, Taoists and so on often rejected the idea of gods, but they certainly weren't atheists. They believed in concepts like the afterlife and souls, after all.
Excuse me, I'd like you to meet Epicurus...
Epicurus was not an atheist, he explicitly believed that the Olympean pantheon existed. Epicurus was merely atheistic in the sense that he tried to apply a scientific explanation to the existence of gods and believed they had no influence or stake in the realm of mortals.
- 1