The Office for National Statistics (ONS) said Britain's economy expanded 0.3% month-on-month, after a drop of 0.5% in December - a reading that is likely to further allay recession fears, at least in the short term.
A Reuters poll of economists had pointed to growth of 0.1%.
The pound rose against the dollar and euro on the back of the figures, which showed growth was powered entirely by services - much of it due to the one-off bounce in the education sector.
The entertainment sector - helped by the men's soccer Premier League returning to action after the 2022 World Cup - was another fillip for the economy.
In a sign of deeper problems for the economy, manufacturing and construction contracted.
"Looking beneath the surface, the figures suggest the economy is on weaker ground than it appears," Ruth Gregory, deputy chief UK economist at consultancy Capital Economics.
Martin Beck, chief economic advisor to the EY ITEM Club forecasting group, said widespread strikes in December and January likely explained why the economy remained below its level in November.
The ONS said economic output in January stood 0.2% below its pre-pandemic level of February 2020 - in contrast to other advanced economies - and had shown zero growth over the last three months and the past year.
Friday's data are unlikely to materially change the debate at the Bank of England as it weighs up whether to raise interest rates again at its March meeting.
The chance of a 25 percentage point increase in Bank Rate on March 23 receded slightly on Friday to about 83%, according to financial market pricing, from 100% earlier this week.
The opposition Labour Party, ahead of Sunak's Conservatives in the opinion polls by a wide margin, said the data showed the economy was only "inching along" amid a wider trend of managed decline.
The ONS said half of the 0.3% growth rate comprised the education sector, as a result of children returning to school after a significant drop in attendance in December.
The government had previously reported high rates of flu and scarlet fever during December. Fear of contracting COVID-19 over Christmas may also have contributed to children being taken out of school early.
Education represents 6% of Britain's economy and student numbers are the main way the ONS measures the quantity of service the sector provides.