The monthly deficit was £4.14bn, up from £1.07bn in September.
Between August and October there was a deficit of £8.4bn, a £2.4bn increase from the previous quarter, the Office for National Statistics (ONS) said.
The growing deficits were due to a big increase in imports of goods, combined with a small decrease in exports.
"October's dismal UK trade figures provided further signs that the economic recovery has remained worryingly-unbalanced in the fourth quarter," said Paul Hollingsworth, UK economist at Capital Economics.
"The economic recovery looks unlikely to garner support from the external sector in Q4, and instead will remain reliant on the domestic services sector."
The monthly trade deficit figures are notoriously volatile, and the ONS lost the national statistic designation from the series following a series of errors last year.
The deficit in goods in the three months to the end of October was £31.6bn, £2.5bn wider than in the previous quarter.
That was largely due to a £1.6bn fall in fuel exports and £1.3bn rise in imports of machinery and transport equipment.

The Oxford Mail reported Thomas Yuill's remains were found at his Oxford flat when police forced entry on Friday.
Housing officers visited the property in January but saw "no concerns" for the 82-year-old's welfare and left.
Blackbird Leys councillor Linda Smith said: "I'm shocked...why wasn't [this case] followed up for so long?"
Mr Yuill stopped paying the rent on his Blackbird Leys flat in November, and housing officers visited his flat in Sorrel Road in January but saw "no concerns for his welfare".
In April, Oxford City Council housing officers called the city's John Radcliffe Hospital, county's coroner's office and care homes in the area to try to locate him.
On Friday the council asked police to force entry to the property, where Mr Yuill's body was found.
Cabinet member for housing Mike Rowley said: "It wasn't an unusual thing for his neighbours not to see him for weeks at a time."
He said the council was launching an inquiry into the "tragic case."
The council said it had identified 700 residents who might be "socially isolated" who would be contacted by officers in the next three weeks.
The UK's trade deficit - the difference between the amount it imports and exports - widened considerably in October, according to official figures.
[NEXT_CONCEPT]
A man's body was undiscovered at his flat for seven months after he died, despite council officers visiting the property when he stopped paying rent.