In politics and culture, the year 2017 was the opposite of Where’s Wally? The question, instead, was always Where Isn’t Trump? All roads – public debate, private argument, artistic endeavour – seemed eventually to lead in his squalid direction; his gravitational pull irresistible, his fleshy presence horribly ubiquitous.

It wasn’t just the explicit satire of, say, Saturday Night Live that kept the US president front and centre in cultural life. Lee Hall’s triumphant reworking at the National Theatre of Network, Paddy Chayefsky’s 1976 film about mass media and demagoguery, held a more subtle mirror up to the age of Trump.

Shakespeare’s history plays acquired fresh and often unsettling relevance (watch out for the Bridge theatre’s production of Julius Caesar, opening in London next month). Even War for the Planet of the Apes teemed with apparent parallels in its post-apocalyptic vision of walls, segregation and deportation.

Yet it was Hulu’s television adaptation of Margaret Atwood’s The Handmaid’s Tale that jangled the nerves most vividly and to such startling effect. Set in the near future, it imagined Gilead: an authoritarian mutation of the United States, in which the constitutional apparatus has been forcibly dismantled and replaced by the patriarchal rule of “Sons of Jacob”, stripping women of all rights and enslaving those who remained fertile as handmaids, serially raped in a pseudo-biblical “ceremony” to provide the childless governing caste with progeny.

The Handmaid’s Tale was ostensibly televisual fiction. Yet in its uncompromising exploration of fear and power and its abuse, it also captured the lightning of the moment in a bottle of dystopian genius. It was nothing short of mesmeric, all the more so on repeated viewings.

When the series was ordered in April 2016, Trump was the frontrunner to win the Republican nomination but not quite the presumptive candidate. It was still orthodox to assert that Hillary Clinton would trounce him in the election itself. His unapologetic misogyny had been perfectly clear at the first Republican contenders’ debate in August 2015, in which he sparred with the moderator, Megyn Kelly, and insulted Rosie O’Donnell. But the notorious Access Hollywood tape – “grab them by the pussy” – did not become public until October 2016, by which stage The Handmaid’s Tale was already in production.

Yet, through luck, intuition or a combination of the two, the series became a disturbing text for our times. Produced by Atwood, author of the original novel, and Elisabeth Moss, who played the lead character, June/Offred, it did more than a thousand news bulletins to capture all that was most toxic about the new populist right and the shredding of constitutional norms.

When the book first appeared in 1985, it was hailed as an ingenious thought-experiment and, of course, a bleak warning. Atwood’s point was that all the practices she described in fictional Gilead were actually taking place somewhere in the world. She was right, too, to draw attention to the strong strain of Puritanism embedded in American culture by the first settlers – at least as powerful as the Enlightenment values usually associated with the founding fathers.

But context is all. What seemed a cautionary tale then feels more like a deafening klaxon now. Why? Because the world of Offred, though still notionally a fiction, has migrated from creative construct to the realm of the thinkable. Gilead’s use of technology to subordinate women overnight seemed all too close to the bone in the year in which the power of digital manipulation and cyberwarfare to distort the democratic process became chillingly apparent. If the roots of pluralism, minority rights and constitutionalism were as shallow as Trump clearly believed, then anything was possible.

And that is not all: just as the series acted as a mythic commentary upon the culture wars of the Trump era, it also prefigured the fightback of the #MeToo movement. Jodi Kantor and Megan Twohey broke the Harvey Weinstein story in the New York Times in October. But the global phenomenon spawned by their initial investigations was luminously foreshadowed in The Handmaid’s Tale – and in one particular scene.

In the final episode, Offred and her fellow handmaids are assembled to stone one of their number to death. In a moment of beautifully captured solidarity, they refuse to comply, each dropping her stone as the scandalised guards and the supervising “Aunts” look on. The shot of their rebellious march away from the execution site to the strains of Nina Simone might be the backdrop to all that followed in the real world.

There are T-shirts for sale online that bear Gilead’s theocratic greeting: 'Under his eye'

Not that the story ends there. “There will be consequences,” says Ann Dowd’s Aunt Lydia. “Believe me.” As in art, so in life. If you doubt that the #MeToo movement has sown male resentment, look at some of the MGTOW (Men Going Their Own Way) sites and Reddit threads, and think again. There are T-shirts for sale online that bear Gilead’s theocratic greeting, “Under his eye”. Do you think it is women who are buying them?

Twenty-six years ago, Susan Faludi warned in Backlash that the struggle for gender equality was only just beginning. Just as many on the alt-right envy Islam’s segregation of women, so there are men, seething as never before, who privately regard Atwood’s Gilead not as a dystopia but an inspiration. As I overheard one say after watching the first few episodes: “When does it start getting bad?”

Atwood’s novel is opaque about Offred’s fate but ends with an arch postscript – the minutes of an academic conference in 2195 – implying that Gilead eventually collapses. In contrast, the television series returns in the spring to resume the story of the characters she created more than 30 years ago.

The spark of hope at its heart is the notion that history is not preordained, that its unfolding depends upon human agency and courage: nolite te bastardes carborundorum (“don’t let the bastards grind you down”) is the scratched graffito written by one of Offred’s predecessors. The secret package given to her by the resistance contains not a bomb but something much more potent: the letters of scores of handmaids, breaking their silence.

Small wonder that this extraordinary series gripped our imagination this year and, I expect, will do so again in 2018. As Atwood has remarked of her novel: “You don’t write these things hoping they become more relevant.” Alas, that choice is not in the writer’s hands.

• Matthew d’Ancona is a Guardian columnist