Shorthanded Liverpool looked destined for a disappointing draw, but the defender headed home in the dying seconds to steal the three points.
A wet and windy afternoon at Turf Moor saw Liverpool bring in the New Year with a dramatic 1-2 victory over Burnley in a scrappy clash in the Premier League.
In a game devoid of quality, Liverpool's Sadio Mane looked to have clinched the game for the visitors after his stunning strike from the edge of the box gave the Reds the lead in the 61st minute. However, a bout of pressure in the final ten minutes saw the Clarets equalize through Jóhann Berg Guðmundsson in the 88th minute.
As the game entered stoppage time it looked for all money that both sides would have to settle for a draw, Ragnar Klavan stepped up for the Reds to steal a win at the death.
With less than two days recovery time for both clubs heading into the New Year fixture a number of changes were made from both managers.
Liverpool were without both Mohamed Salah and Philippe Coutinho for their trip to Turf Moor after the pair - who have a combined for 35 goals this season - picked up minor injuries in the Reds' win against Leicester. While Burnley welcomed back defender James Tarkowski following his three game suspension.
Liverpool started as the brighter of the two sides as their trademark pressure off the ball forced the Clarets into rushing in possession, but the visitors' lack of creativity up front showed in the absence of three of their most dangerous players - as Roberto Firmino started on the bench.
Despite initially offering little in the way of action in the final third, Sean Dyche's side provided a glimpse of the danger they posed on the counter as Adam Lallana was forced to make a last ditch tackle on Gudmundsson - who would have been able to make a clean run at Simon Mignolet's goal without the intervention in the 20th minute.
The organized Burnley outfit provided little space for Liverpool to attack into forcing Jurgen Klopp's side to play in-front of them, creating opportunities for the home side to capitalize on individual mistakes from the visitors.
Emre Can and Joe Gomez duly obliged for the home side as their misplaced passes invited the Clarets into the game as their confidence in attack grew. Yet, despite a series of efforts from Scott Arfield and a number of dangerous crosses into Liverpool's area Burnley lacked quality to punish the Reds.
In just his third Premier League start Dominic Solanke was offered Liverpool's best chance of the half when Alex Oxlade-Chamberlain threaded the ball into the box, but the 20-year-old's heavy first touch allowed Burnley to clear the danger.
The remainder of the first period saw the game liven up as both sides looked to move the ball with pace, with a final pass and clinical edge evading both sides as they headed into the halftime break.
While the game's tempo remained at full throttle at the start of the second half, the lack of accuracy across the park was not in line with what is expected at the Premier League level.
Despite the lack of quality, Liverpool started brightly as they pinned the home side in their defensive third and it paid dividends in the 61st minute. A poor cross into the box from Trent Alexander-Arnold was turned into a piece of magic by Mane on the edge of the box, as he swiveled onto his left and drilled the ball into the roof of the net.
The Reds continued to dominate after taking the lead as their sustained pressure resulted in consecutive corners and a stunning long-range effort from Alexander-Arnold, whose powerful strike was saved superbly by Nick Pope.
For all of Liverpool's dominance however, the Burnley faithful were ramping the pressure on the visitors and encouraging their side to strike back as the Clarets took control of the final 10 minutes.
Burnley's resilience ultimately paid off in the 88th minute as Gudmundsson headed the Clarets level after peeling off the back of Gomez to comfortably slot the ball into the back of the net.
Just as the game looked destined to end as a draw a last minute free-kick gave Liverpool a dramatic victory to start the New Year as Oxlade-Chamberlain's delivery was headed on by Dejan Lovren to the back post, which was then bundled over by Klavan to send the away crowd into raptures.
The FA Cup is next on the agenda for both sides as Burnley are set to host Manchester City on Saturday while Liverpool will face arch rivals Everton at Anfield on Friday evening.