But the survey also revealed a stark generation gap in party support, with 18-24 year-olds backing Labour over Tories by an overwhelming 56 per cent to 21 per cent, while over-64s preferred Mr Johnson’s party by a margin of 64 per cent to 17 per cent.
The crossover age at which voters were more likely to vote Tory than Labour reduced from 47 in 2017 to 39 in last week’s election.
The YouGov survey, conducted on December 16, found that Tories outperformed Labour in every social class.
But unlike previous elections, the Tory advantage was smaller (10 points) among social grade AB (professionals and managers) - with Conservatives taking 42 per cent and Labour 32 per cent - than in the working class C2DE group, where Mr Johnson’s party led by 15 points on 48 per cent to 33 per cent.
Labour’s support was concentrated in the younger and better educated sectors of society.
Among those with a degree or higher educational qualification, Labour led by 43 per cent to 29 per cent, and among full-time students by 56 per cent to 17 per cent.
Voters with low educational attainment - GCSE or below - backed Tories over Labour by 58 per cent to 25 per cent, while those with a medium-level education favoured Mr Johnson’s party by 48 per cent to 31.
Labour retained the bulk of its Remain supporters from the 2017 election (79 per cent) but lost 33 per cent of its Leave backers to Tories. Some 22 per cent of Tory Remainers switched to the Liberal Democrats, but only 2 per cent of Consevative Leavers defected to the Brexit Party.