It was the fastest pace of growth since 1941, although it came after a dramatic 9.4% collapse in 2020 as the pandemic forced parts of the economy to shut.
In December, the economy shrank 0.2% as Omicron restrictions hit the hospitality and retail sectors.
Chancellor Rishi Sunak said the economy had been "remarkably resilient".
The Office for National Statistics (ONS) figures showed that in the last three months of 2021 growth was 1%, which ONS director of economic statistics Darren Morgan said was "pretty healthy" given Omicron's spread and the introduction of some restrictions.
The figures were stronger than expected, and Mr Morgan told the BBC the expansion in 2021 showed the UK was the fastest growing economy in the G7 group of nations. However, he urged caution about making strict comparisons.
"The growth in 2021 comes from a low base in 2020, when the economy fell sharply," Mr Morgan said. "And if you look at where the UK economy is now, compared to its pre-pandemic level... the UK is middle of the pack, compared with the G7."
He said using this comparison, the US, Canadian and French economies were above the UK's, while the UK was above Italy, Germany and Japan.
The worst of the overall pandemic economic hit is now behind us but the aftershocks remain.
Downing Street is unlikely to avoid the opportunity to boast about 2021. During its hosting of the G7, the UK is now confirmed as the fastest growing economy of these major nations.
But that comparison needs a great dollop of context.
The 7.5% growth the UK economy recorded in 2021 is the highest of the G7 major economies and that does indicate a strong bounceback.
This, as the ONS points to, should be seen alongside the sharpest fall of 9.4% for the UK compared to those same economies in 2020. On the internationally comparable basis, the economy is still slightly smaller than it was at the end of December 2019, unlike the US, France and Canada. On the slightly more timely basis, using monthly data not available in other countries, the UK economy is larger than it was in February 2020.
The UK economy grew by 1% in the final quarter of 2021, a little lower than expectations, as the spread of the Omicron variant weighed on the economy in December.
But as ever during these extraordinary times, this already looks like a rear view mirror on events. Looking forward, the extraordinary cost of living squeeze, with energy and other prices leading to falls in average living standards, is the significant iceberg for the economy in 2022.
The ONS said that despite the fall in December, on a monthly basis GDP was in line with its pre-coronavirus level in February 2020.
However, GDP in the October-to-December quarter remains 0.4% below its pre-Covid levels in the final three months of 2019.
Mr Sunak told the BBC: "Today's figures show that despite Omicron the economy was remarkably resilient. We were the fastest growing economy in the G7 last year and are forecast to continue being the fastest growing economy this year.
"But I know that people are worried about rising prices, particularly energy bills... and that's why last week we announced a significant package of support to help millions of families meet the cost of bills."
Last year's growth was the strongest since ONS records began in 1948 and the fastest since 1941, during World War Two, using data collected by the Bank of England.
The slump of 9.4% in 2020 was the biggest drop since 1919 when there was demobilisation after World War One.
After 18 months of uncertainty, Ollie Vaulkhard's coffee shop and restaurant chain in north east England was seeing a strong end to 2021.
He told the BBC's Wake up to Money programme that October and November were great months for the Vaulkhard Group as the economy opened up, but then things started to slow when Omicron hit.
"We lost customers, we lost staff to isolation and we had people being cautious because they had plans for Christmas."
He doesn't regard December as a disaster, more a loss of momentum. "We lost the fizz off the top of a glass of champagne," he said.
A better December would have been a good launch into 2022, when Mr Vaulkhard expects some tough times.
"We have wage cost rises, we have supply cost rises, we've had some brewery costs going up by 7% - they are all large," he said.
The pandemic and lockdown kept a lid on costs for two years, but suddenly it's changing.
"I would prefer not to have them [price rises], but given the challenges we had this seems like another bridge to cross that we'll have to find a way over."
The economy is expected to face headwinds in 2022. Last week, the Bank of England raised interest rates, cut its economic growth forecast from 5% to 3.75% for this year and predicted that households were about to suffer the sharpest fall in living standards since records began three decades ago.
This, said Labour's shadow chief secretary to the Treasury, Pat McFadden, would mean the economy will "crawl" this year and see the slowest growth of any G7 country.
"The reality is the way the government runs our economy is trapping us in a high tax, low growth cycle," he said.
Inflation is forecast to hit 7% in April, the same month workers and firms will start to see a rise in their National Insurance (NI) contributions. Mr Sunak has been under pressure to scrap the NI increase, but vowed this month that it would go ahead.
Thomas Pugh, an economist at RSM UK, said he expected output lost during December and January to be regained in February and March, "meaning that Omicron should not have had a lasting impact on the economy".
But he warned that consumer spending power would take a big hit in 2002.
Suren Thiru, head of economics at the British Chamber of Commerce, said that "crippling" inflation, tax rises in April, and higher energy bills means "the UK economy is facing a materially weaker 2022".