The Commerce Department reported the trade gap narrowed to $38.5 billion from a revised $48.6 billion in November.
The December number was well below the average analyst estimate of $45.4 billion and snapped three months of widening deficits.
The $10 billion drop -- the biggest month-on-month decline in nearly four years -- was largely due to a drop in oil imports.
The last time the US trade deficit was smaller was in January 2010, raising some analysts' expectations that the economy's fourth-quarter growth would be revised higher.
In December, exports rose 2.1 percent to $186.4 billion, boosted by a 9.5 percent jump in industrial goods sales.
Imports fell 2.7 percent to $224.9 billion. Petroleum imports plunged 13.0 percent to $22.1 billion.Analysts said the December results indicated that US economic growth in the fourth quarter may have been better than first thought. The government's initial estimate of gross domestic product growth was a 0.1 percent contraction.
"It now looks likely that net trade provided a modest boost to Q4 GDP growth, having initially been estimated to have been a drag," Barclays analyst Peter Newland said.
The closely watched trade gap with China, the country's second-largest trade partner, shrank 15.5 percent in December to $24.4 billion as imports of Chinese goods fell.
But for all of 2012 the China trade gap topped $300 billion for the first time, at a record $315.1 billion.
The US trade deficit also narrowed significantly with the European Union in December, falling 28.4 percent to $8.7 billion.
Compared with December 2011, exports were up 4.9 percent and imports fell 2.0 percent.
For the full year, the US trade deficit fell 3.5 percent to $540.4 billion, with exports up 4.4 percent and imports rising 2.7 percent.