In ancient Athens there was a dinner society called the Bad Luck Club. Determined to mock the gods and the laws of the city, its members were said to have scheduled their private meals on ill-omened days, when feasting was forbidden. Having thus piqued the gods, all of them died miserable deaths, except for one lone survivor, whose life, we are told in an account from the third century A.D., was more a punishment than death would have been anyway. Stories like this one, written not by atheists but by pious contemporaries who often regarded them with suspicion, make up much of the evidence that attests to atheism in ancient Greece.

Few texts by ancient disbelievers have survived. And yet, as Tim Whitmarsh argues in “Battling the Gods: Atheism in the Ancient World,” “atheism has a tradition that is comparable in its antiquity to Judaism (and considerably older than Christianity or Islam).” Mr. Whitmarsh, a classicist at the University of Cambridge, has undertaken to tell the story of Greek atheism over a thousand-year period. Drawing on the close reading of many texts, he suggests that the tradition of Greek disbelief is more considerable than previously imagined, that Greek atheists were “airbrushed out of ancient history, or their significance minimized.” His book, which ranges from the dark ages of Greece to the imposition of Christianity as the sole legal religion of the Roman Empire in the fifth century A.D., is a remarkable survey of the ways in which the Greeks questioned and rejected notions of the divine, as impressive for its breadth and erudition as for the concision, clarity and ease with which it conveys a sometimes forbiddingly complex story.

For much of Greek antiquity, Mr. Whitmarsh writes, atheism wasn’t treated as a heresy but was “seen rather as one of the many possible stances one could take on the question of the gods (albeit an extreme one).” This was in large part owing to the pluralistic nature of ancient Greek society. Classical Greece was a world of squabbling city-states spread around the Mediterranean, as Plato wrote, like “frogs around a pond.” Just as they had no one ruler, the Greeks had no one sacred text—no equivalent of the Tanakh, the Bible or the Quran. The pantheon, established mainly by the epics of Homer and Hesiod, was roughly the same for all Greeks, and yet always different. “In Greek polytheism,” Mr. Whitmarsh explains, “religious ritual is always localized: you pray not to Athena as an abstract deity but as her specific manifestation in your local sanctuary.” And in each city, the same god would be worshiped differently. Consider the example of Artemis, who, Mr. Whitmarsh writes,

at Brauron near Athens presided over a ritual involving young girls of marriageable age dressing as bears; who near Ephesus on the Anatolian coast occupied the largest temple in the region and was depicted in the guise of a pre-Greek deity with a profusion of what have been variously interpreted as breasts, eggs, or even bull’s testicles; and who at Patrae was worshipped, as Artemis Laphria, with a huge fire onto which were thrown wild animals of all kinds.