The Markit/CIPS Manufacturing Purchasing Managers' Index (PMI) rose to a 15-month high of 51.4 in December from an upwardly revised 49.2 in November - a far stronger increase than any predicted in a Reuters poll of 24 economists.
Britain's economy is forecast to shrink 0.1 percent in the last three months of 2012. But stronger-than-expected official services output data for October, released just before Christmas, raised the prospect that the economy will avoid contraction.
The manufacturing index's upturn takes it above the 50-mark that separates growth from contraction for the first time since March, and breaks with poor official data, which showed a 1.3 percent fall in factory output for October.
"UK manufacturing exited 2012 on a positive note, with December's PMI data signalling a reassuringly solid return to growth for the sector," said Rob Dobson, the Markit economist who compiled the survey.
"The domestic market remained the main spur for growth ... in December, although there are also signs that global trade flows are stabilizing as China and the U.S. strengthen and the downturn in the euro zone eases," he added.
Nonetheless, the output component of the manufacturing PMI rose to 54.0 in December, its highest level since April 2011, from 50.5 in November, though Markit said the sector still contracted for the fourth quarter overall.
New orders rose at the fastest rate since March 2011, driven by domestic demand, while export orders fell, albeit at the slowest pace since September.
"Business confidence... remains fragile and could easily be derailed by setbacks in key export markets, notably any resurgence of the euro zone debt crisis," Dobson said.
Britain's economy also faces headwinds from a long-term government austerity program and inflation that has proven slower to fall than the Bank of England has forecast, eating into consumers' spending power.
Wednesday's data showed continued price pressures on manufacturers, whose costs rose at the fastest rate since March, driven by chemicals, energy, food products and plastics. Manufacturers in turn raised the prices they charged at the fastest rate since April.
Employment in the sector fell marginally, showing the smallest decline since August.