Neymar and Luis Suarez had both scored to give the home side a two goal lead at the break, but a penalty from Mario Mandzukic pulled the visitors back into the game.
But with Fernando Torres thrown on and Atletico seeking a leveller, Messi poked home to ensure the points stayed with Barca, keeping them within one point of league leaders Real Madrid and moving them three clear of Diego Simeone’s side.
The result was in stark contrast to what had gone before it.
Barca’s players could have binged on food and alcohol over Christmas and they would have come into this match in better shape.
Since last Sunday they’ve lost to David Moyes’s Real Sociedad; seen Luis Enrique and Messi’s relationship edge towards divorce; sacked Andoni Zubizarreta from his role as sporting director; and president Josep Maria Bartomeu has called early elections to “lower the tension around the club”.
In six meetings between the two sides last season, they won none, were knocked out of the Champions League and had the title taken from them on the final day of the season at Camp Nou.
On top of that, Simeone had turned the Rojiblancos into Messi’s kryptonite – Barca’s No10 had failed to find the net in his last seven appearances against Atletico.
Luis Enrique’s side needed a win here more than ever and Messi, with rumours of a move to the Premier League creeping towards believable, despite everything he has achieved in Spain, needed to make a statement.
Within 10 minutes there were already signs that his battle with makeshift left-back Jesus Gamez was going to be a mismatch.
A determined run from Neymar created space for his South American colleague in the box, but Messi, despite ghosting past Gamez, could only find the side netting. It was a sign of Barca’s — especially their front three’s — intent and two minutes later they were in front.
Messi exchanged passes with Alves, again causing more trouble for Gamez, and cut the ball back for Suarez. The former Liverpool forward fluffed his lines, but Neymar was on hand at the back post to re his 17th goal of a fruitful campaign.
His 18th should have followed after superb work from both Messi and Suarez. The Uruguayan beat his man after Messi had performed miracles to keep the ball in play and send his teammate scuttling down the line, and stood the ball up perfectly for Neymar. It demanded a goal. Neymar headed wide.
Suarez didn’t make the same mistake when Messi set him up for Barca’s second 10 minutes before the break. At first glance it looked like a dose of the usual Messi magic, but his cheeky grin afterwards, Simeone’s remonstrations and television replays proved he’d used a hand to race past Gamez on this occasion.
Atleti, therefore, may feel justice was done in the second half when Gamez took a tumble under pressure from Messi in the box.
With whistles of displeasure ringing around the sell-out crowd, Mandzukic did well to keep his head and slam the ball down the middle, setting up a tense final 30 minutes. And just in case any more narratives needed to be fulfilled, Simeone threw on Torres in search of an equaliser.
Raul Garcia followed him from the bench and Atletico’s aim was clearly to utilise their big men at set pieces in a bid to salvage the point that would have kept them level with their hosts.
Barca, to their credit, defended well when they were forced into aerial combat. Chances were limited in what proved a delicate, if not entirely action-packed ending.
With Luis Enrique still ushering his players forward at every given opportunity, Messi had one last chance to end his goal drought and secure the destruction of Atletico’s recent hold over Barca in the process.
It looked like the chance had gone at first, but he snapped the ball home when it popped back into his possession.
What’s been a difficult week at Barcelona has had an upbeat ending.