Lionel Messi's goal is the 500th time he has scored in a Barcelona shirt.
La Liga title-holders Barca recorded a stunning 3-2 victory over bitter rivals, Madrid thanks to Messi's 92nd-minute victor at the Santiago Bernabeu on Sunday.
Barcelona defender, Gerard Pique said his Real Madrid counterpart, Sergio Ramos deserved to be sent off as Barcelona beat Real Madrid in Sunday's Clasico, adding that Ramos was actually talking to him after he was red carded.
But even though a draw would have put them on the brink of securing their first league title since 2012, Madrid was pushing for a victor when Barca picked them off in the second minute of stoppage time, the Argentina worldwide converting Jordi Alba's cutback with a trademark finish.
James Rodriguez appeared to have rescued a point for the hosts with an 86th-minute strike to make it 2-2 after goals by Messi and Ivan Rakitic had overturned Casemiro's opener.
The match seemed to have swung decisively in Barca's favor four minutes later when Ramos scythed down Messi to be shown the 22nd red card of his career.
"We are first now but Madrid have an extra game", Barcelona coach Luis Enrique said. "There were many chances for both teams and the pace was very high", Luis Enrique continued.
"I'm not saying we lost our heads but with the scores level and with 10 men, we pushed very high up and that's unsafe, so we've paid for it in the end", said the ex-France midfielder. The youngster set up Ronaldo in the second period but the Portugal global blasted over from close range.
The Argentine was still down when Ronaldo drilled another fine effort towards goal that Marc-Andre ter Stegen did well to parry to safety.
Madrid forward Gareth Bale, who was doubtful before the game, came off the field injured again in the 39th.
Ronaldo had a few good chances but was not able to capitalise on them.
There was nothing Navas could do to deny Barca 17 minutes from time when Rakitic took aim from 25 yards and drilled into the top corner.
Celta Vigo followed its qualification for the semifinals of the Europa League with a home loss against Real Betis.