Economists polled by Reuters had forecast the trade deficit falling to $41.4 billion. When adjusted for inflation, the deficit was little changed at $50.84 billion, suggesting trade would be a drag on fourth-quarter gross domestic product.
Trade was one of the contributors to the third quarter's brisk 3.9 percent annualized growth pace.
Imports increased 0.9 percent in October to a record high of $241 billion. Petroleum imports were the lowest since November of 2009. A domestic energy boom has enabled the United States to reduce its dependence on foreign oil, easing pressure on the trade deficit.
Declining oil prices, which fell in October to their lowest level since February of 2011, are also helping to curb the import bill.
While a slowing global economy is dampening crude oil prices, there is little sign that U.S. exports are taking strain.
Exports increased 1.2 percent to $197.5 billion in October.
Exports to the European Union increased 8.5 percent, while China saw a 36 percent jump in the value of goods it imported from the United States. Exports to Japan rose 4.0 percent, while those to Canada and Mexico - the main U.S. trading partners - reached record highs.
Sustained dollar strength, however, is expected to undercut export growth in the months ahead.
Imports from China hit an all-time high, leaving the politically sensitive trade gap at $32.6 billion.
(Reporting by Lucia Mutikani; Editing by Paul Simao)