A missed tackle by Sergio Busquets left Toni Kroos to start a counterattack that Ronaldo completed by sending a headed pass by Karim Benzema over the line to equal Alfredo Di Stefano's club record of 18 goals against Barcelona.
"We had a good opportunity to win today, clearly, we had a lot of chances to score, especially in the first half".
Champions Barca have 87 points while Real are third in the Liga standings with 72 after 35 games. Sergi Roberto also impressed, before being sent off.
The 33-year-old is coming towards the twilight of a glittering career though and that has seen him linked with a move away from Madrid.
And that Messi challenge came moments after an altercation between Ramos and Luis Suarez that earned both yellow cards. Messi put his squad ahead in the 52nd minute. If the knock that saw the latter depart at half-time turns out to be serious, the issues becomes moot in the UEFA Champions League final, but if not, it's a tactical decision he has to make.
Suarez appeared to have fouled Raphael Varane in the build-up to Messi's goal and the Uruguayan forward had a goal ruled out for offside three minutes later.More news: McCain Doesn't Want Trump At Funeral, Friends Tell White House
More news: First parliamentary elections in nine years in Lebanon to be held
More news: InSight probe to survey Mars for secrets inside the planet
Sunday's Clasico between Real Madrid and Barcelona well and truly lived up to the hype.
It has been confirmed Cristiano Ronaldo will be fit to play the Champions League final against Liverpool despite injuring his ankle in El Clasico. Barca will claim Real scraped a draw against opponents down to 10 men for half of the match while Real will say they were without their star player for the same time, and perhaps longer at full fitness.
The other one was Suarez's challenge on Varane before Messi's goal, with the Uruguayan striker admitting that he was surprised a foul wasn't called after he clearly tripped the France global.
Except, it wasn't by rivals Real Madrid, who had refused such an act beforehand and made intentions clear.