The total rainfall for the UK during 2012 was 1,330.7mm (52.4in), just 6.6mm short of the record set in 2000.
Most areas were affected by the extreme weather, with thousands of homes flooded and farmers struggling to grow crops in the saturated soil.
The latest data comes as analysis says the frequency of extreme rainfall in the UK may be increasing.
BBC environment analyst Roger Harrabin said statistics showed that days of particularly heavy rainfall had become more common since 1960.
The study into extreme rain was based on statistics from the National Climate Information Centre, the UK's official climate record.
The Met Office said this was the wettest year on record for England, the third wettest for Wales, the 17th wettest on record for Scotland and the 40th wettest for Northern Ireland.
The records date back to 1910.
Continue reading the main story
The Met Office added that four of the top five wettest years had occurred since 2000."The trend towards more extreme rainfall events is one we are seeing around the world, in countries such as India and China, and now potentially here in the UK," said Met Office chief scientist Prof Julia Slingo.
"Much more research is needed to understand more about the causes and potential implications."
Most areas in the UK experienced flooding during 2012, affecting thousands of homes and businesses.
In the run-up to Christmas, South-West England was particularly badly affected, with a number of railway lines remaining closed over the entire festive period.
The Environment Agency said almost 8,000 properties in England and Wales were flooded during 2012 and it sent more than 200,000 warnings to households and businesses.
However, it added that flood defences had protected more than 200,000 properties in at-risk areas. More