Messi came up trumps again for Barca at the Wanda Metropolitano, where an even contest looked destined to finish goalless.
Madrid: Lionel Messi delivered a major boost to Barcelona's La Liga title hopes by scoring a late winner in a 1-0 victory at Atletico Madrid on Sunday.
Messi is the favourite to win a record-breaking sixth Ballon d'Or in Paris on Monday and he came up trumps again for Barca at the Wanda Metropolitano, where an even contest looked destined to finish goalless.
"In matches that are close and intense, having Leo is always a big advantage," said Barcelona coach Ernesto Valverde.
The Argentinian's 86th-minute strike, after a neat one-two with Luis Suarez, keeps Barcelona level on points with Real Madrid at the top of the table while leaving Atletico with a mountain to climb if they are to rejoin the race.
"It's important for the three points but also for the mental side," said Valverde.
"It sends us into the Christmas period with confidence."
Atletico now sit six points adrift of both Real and Barca, with those two also having a game in hand which will be played out in the season's first Clasico at the Camp Nou on December 18.
It means Atleti could conceivably head into the Christmas break nine points off the lead, a significant gap, particularly considering they will have to play away against both Barca and Real Madrid in the second half of the season.
"We need points," said Atletico coach Diego Simeone.
"We are not far from them but we are worried. I am happy with the way we are playing but I will not smile at that because that does not bring us points."
Antoine Griezmann was whistled on his return to his former club, whom he left for 120 million euros USD 132.3 million) to join Barcelona in the close season, while toy rats were dropped on the plaque that still bears his name outside the stadium.
But Messi scored his 12th goal of the season and sixth in his last five games. He has now 25 in 27 in the league against Atletico although this was his first at the Wanda Metropolitano.
- Pique reprieved -
Barcelona were fortunate not to be reduced to 10 men in the second half when Gerard Pique escaped a second yellow card for a late challenge on Alvaro Morata. They rode their luck in the opening 20 minutes too, marooned in their own half and able only to survive thanks in large part to their goalkeeper.
Marc-Andre ter Stegen made two excellent point-blank saves although was given the chance to as Mario Hermoso found himself free at the back post but shot straight at him before Morata met Kieran Trippier's corner but failed to head into the corner.
There had been little Ter Stegen could do about Hermoso hitting the post early on as his pull-back was diverted almost disastrously by Barca left-back Junior Firpo but somehow stayed out.
Yet after a dizzying opening spell, Barcelona stabilised and finished the half the stronger. Messi skipped free down the right but was ushered out, Suarez fired wide and Pique's header bounced up onto the crossbar.
Thomas Partey should have scored after the interval but opted to pass while Suarez was generous too, shooting straight at Jan Oblak.
Another break saw Messi skip through three attempts to bring him down, only for Griezmann to blaze over at the back post. Atletico went close with 20 minutes left but Angel Correa's drive was cleared by Sergi Roberto, with Ter Stegen beaten.
Pique had been lucky to avoid a second yellow card for a sliding challenge on Morata moments before.
Instead, Barca pressed on and with four minutes left, Messi delivered the game's defining moment.
Thomas Lemar's crossfield ball was cut out and on the break, Messi drifted in from the right, past two tired Atletico defenders. He bounced the ball off Suarez and steered the ball into the bottom right-hand corner.
Earlier on Sunday, third-placed Sevilla stayed just one point behind Real and Barca with a 1-0 victory over Leganes.
Julen Lopetegui's side extended their unbeaten run in all competitions to 10 matches as Brazilian centre-back Diego Carlos bundled in a 63rd-minute winner at the Estadio Ramon Sanchez Pizjuan.