Theresa May is somewhere in the Swiss Alps, spending the second week of her three-week holiday hiking in the mountains. Although it is hard to detect, she is said still to be running the government. Three weeks away from it all, even if she is working from a hotel room, is a long break in contemporary terms, but hardly enough to get her breath back by the standards of more distant predecessors.

They were unexpected prime ministers in a polarised country, in a party that sneered at them

In the last century it was commonplace to disappear for months at a time. Winston Churchill took his paints to the warm sunlit villas of his rich friends on the Mediterranean. Clement Attlee preferred a bucket and spade on a north Wales beach; Harold Wilson always holidayed in the Isles of Scilly, where he is buried. But one of her predecessors shared May’s enthusiasm for the hills. Most summers, Stanley Baldwin used to turn his back on looming crisis and retreat for three months at a time to walk in the French countryside around Aix-les-Bains.

Baldwin was born 150 years ago this week, on 3 August 1867. He was a Victorian prime minister at the dawn of the modern era. But events shape leaders as much as leaders shape events. Baldwin’s sense of politics is eerily like the woman who followed him as Tory party leader nearly a hundred years after he took office in 1923. They both rose to the top of politics when the highest honours seemed already beyond their grasp. May shares Baldwin’s belief in Conservatism as a doctrine of one nation, and sees herself, like him, as a champion of the working class – even though Baldwin presided over the general strike and May was an unrepentant supporter of anti-union legislation. Most conspicuously, they share a disdain for the moneyed Tory.

It was Baldwin who coined the phrase about the 1918 generation of Tory MPs as “a lot of hard-faced men who look as if they have done very well out of the war”. In an interview with a Sunday paper in 1924 – just after the general election he had unnecessarily called the previous year, in which he squandered a majority and let in the first minority Labour government – Baldwin described how his party needed to change. It should have “a vital democratic creed and [it] must be prepared to tackle evils, social and economic”. He added: “In the past we have been accused, and often rightly, of being too closely identified with vested interests … We must put our house in order and remove many of the abuses whose existence is food for socialistic argument.”

Hear the echo of that sentiment in every word that May spoke on the steps of Downing Street in June 2016: “The government I lead will be driven not by the interests of the privileged few, but by yours. We will do everything we can to give you more control over your lives. When we take the big calls we will think not of the powerful, but you. When we pass new laws we will listen not to the mighty, but to you.”

They were unexpected prime ministers in a polarised country, unfashionable politicians in a party that the grandees had grown accustomed to treating as their own. Baldwin, like May – who sacked George Osborne as chancellor with the advice that he should go and find out more about his party – was dismissed by everyone. He was sneered at by the mighty magnate Lord Curzon, scorned by the aristocratic Churchill, and loathed by the newspaper barons. But his instinct for his fellow Tories’ concerns and prejudices – along with a talent for winning three elections – made him the longest-serving leader of the 20th century Tory party until Margaret Thatcher. The New Statesman editor Kingsley Martin thought that he was a successful premier because every conventional Englishman knew that he shared his prejudices and represented his interests. Remind you of anyone?

Baldwin’s success was dazzling: he survived and prospered through the catastrophic deflation that followed the decision of his chancellor, Churchill, to return to the gold standard in 1924, the general strike in 1926, the Wall Street crash that brought down Labour, and Edward VIII’s abdication in 1936. Baldwin retired the following year, at a moment of his own choosing, ushered out on an extraordinary wave of national love.

Yet there was a weakness that was the flipside of Baldwin’s strength. His exaggerated respect for the popular will that he used to justify deferring rearmament in the 1930s might be justified: the first universal suffrage election was only fought in 1929, and public opinion was adamantly hostile to defence spending. But he had a smallness of vision and a narrowness of focus that left him paralysed in the face of a threat he did not really comprehend, to which the only answer was preparing for a war that he believed would destroy civilisation.

Faced with a conflict between public opinion and the national interest, May seems to share Baldwin’s paralysis. Like him, she agonises over the threat to cohesion posed by the referendum, to the point where she abandons leadership. Her cabinet colleagues, like Baldwin’s, long for some indication of her thinking, even some confirmation that she is thinking and not merely waiting on events.

Later this year, May is due to unveil the first statue ever commissioned of Baldwin, in Bewdley, his Worcestershire birthplace. It seems doubtful that May, unlike him, will recover from election failure to spend another decade as party leader. She is on the wrong side of history, and as with Baldwin, it will be slow to forgive her.

• Anne Perkins has been a leader writer, lobby correspondent and feature writer for the Guardian since 1997