Buyers can now expect to pay 7.8 times their salary to purchase a property, ONS says.
Its data shows that the housing affordability ratio increased by 0.8% between 2017 and 2018.
However, new-build purchasers are paying even more, at 9.6%.
The affordability gap between the most and least expensive places to buy in England and Wales is also at its highest for 20 years, the ONS said.
Copeland, in the north-west of England, remained the most affordable local authority, with average house prices being 2.5 times average workplace-based annual earnings, while Kensington & Chelsea was the most expensive at 44.5 times.
There were 77 local authorities that became less affordable over the past five years, mostly in London, the south-east and east of England, while no areas registered an improvement.
Commenting on the figures, Andrew Montlake, director of mortgage broker Coreco, said: “For anyone trying to get on the ladder in London, these figures are a stark reminder of just how difficult it is.
“The far wider range of affordability in the capital compared to the rest of the UK suggests there is no such thing as one London, just a multiplicity of mini Londons.
“That affordability hasn’t improved in one single local authority is proof positive of how the lack of supply has propped up house prices despite ongoing market uncertainty.
“While getting a foot on the ladder in certain regions of the UK is eminently achievable, in others it is borderline impossible for a significant chunk of the population.
“It’s no surprise that we are seeing such a fundamental shift towards the private rented sector.
“Unless you’ve got a sizeable deposit and a pretty decent income, buying in the south-east corner of the UK is little more than a pipe dream.”