The Office for National Statistics (ONS) said sales volumes in October were up 7.4% from a year earlier.
On a monthly basis, sales jumped 1.9% from September - a much stronger increase than economists had forecast.
October's autumnal conditions boosted clothing sales.
Paul Hollingsworth, UK economist at Capital Economics, said: "Clothing sales in particular were strong, perhaps reflecting the cooler weather prompting a re-stocking of consumers' winter wardrobes."
The ONS also said that internet sales posted the strongest growth for five years, jumping almost 27%.
"Non-store sales have surged over the last months, rising by 4.1% in September and 3.6% in October, showing no weakening in the trend away from spending on the high street to online shopping," said Samuel Tombs at Pantheon Macroeconomics.
The figures suggest consumer confidence remains robust in the face of uncertainty caused by Brexit.
The pound jumped 0.3% to $1.2478 following the data, but fell against the euro.
Stronger sales were helped by falling prices. Average store prices fell by 0.7% in October 2016 compared with October 2015 and there were falls in average store price across all store types, except petrol stations, the ONS said.
However, analysts said that the era of falling prices was set to end soon at a time of weak wage growth.
Chris Williamson, chief business economist at IHS Markit, commented: "UK retailers enjoyed a mini-boom in October. But such spending is looking increasingly unsustainable as inflation is likely to rear its head in coming months and households are growing worried about their future finances."
Mr Tombs said retail sales growth was likely to disappoint in November as clothing sales returned to normal levels.
UK retail sales rose at their fastest annual rate in 14 years in October, bolstered by colder weather and Halloween sales at supermarkets.