With cases of coronavirus reported on four continents, health experts are concerned it could become a pandemic. The world is currently in the grip of two others – Aids and tuberculosis – while measles is on the rise again and polio stubbornly resists eradication. When smallpox was wiped out, some in the medical community were so high on their success they thought other infectious diseases would soon be licked. Fifty years later, this triumph remains unique.

David Quammen’s Spillover serves as a rousing wake-up call, because he conjures up the complex web of microbial ecosystems through which humanity stumbles blindly. Mostly the microbes mind their own business, but occasionally we blunder into their finely tuned arrangements for survival and provoke the spillover of a pathogen from its usual animal host to us. It takes time for them to find a sustainable way to colonise their new host, or hosts, so the initial fallout can be carnage – a trail of gorilla carcasses in an African forest, for example, that heralds an outbreak of Ebola in people.

Not all pathogens acquire the ability to spread easily between humans, but if they do, then a pandemic – an epidemic that encompasses several countries or continents – becomes possible. In the 14th century, long before people connected infection with germs, one or more varieties of plague reduced the population of Europe by as much as half. Philip Ziegler’s classic account of that disaster, The Black Death, shines a light into the medieval mind, revealing how mystical and often paranoid explanations produced cults of self-flagellation and the burning of Jews.

A patient at a hospital in Port-a-Piment, Haiti. Photograph: Hector Retamal/AFP/Getty Images

Stigmatisation of the other has always accompanied pandemics, but so have compassion and heroism. A literary sub-genre is dedicated to the doctors and scientists who have ventured to the centre of pandemics to take on the invisible enemy, and in this category Tracy Kidder’s Mountains Beyond Mountains stands out. It is the story of Paul Farmer, a Harvard professor of health who finds his vocation fighting Aids and TB in impoverished communities in Haiti, and who sleeps no more than a couple of hours a night because, as he tells Kidder, while he’s sleeping, people are dying.

The curious thing about pandemics is that novelists don’t seem to know what to do with them. You would think they would find rich material in a menace that brings out the best and worst in people, and that makes a mockery of all the ways we divide ourselves up – by colour, faith or postcode. But when they have written memorably about them, it tends to have been as allegories for something else – fascism, say, or war. There are exceptions, and Philip Roth’s novel Nemesis is one. Polio is on the prowl in Newark in the summer of 1944, and teacher Bucky Cantor’s girlfriend begs him to leave the city for the polio-free summer camp where she is working. Duty obliges him to stay with the kids in his charge, however, and when he finally does reach the camp, the disease follows him.

Another exception is Pale Horse, Pale Rider, Katherine Anne Porter’s jewel of a novel based on her experience of falling ill during the 1918 flu pandemic. Fifty million died – but she did her writerly duty, and gave us a glimpse of the suffering behind that number. Above all, she managed to convey the grief and in some cases the guilt of survivors who woke into “the dead cold light of tomorrow”.

• Pale Rider: The Spanish Flu of 1918 and How It Changed the World by Laura Spinney is published by Vintage (RRP £10.99). To order a copy go to guardianbookshop.com. Free UK p&p over £15.