The sides went in level 2-2 at half-time as a record 19th goal against Madrid from Messi cancelled out Karim Benzema's double after Andres Iniesta had put Barca in front.
Cristiano Ronaldo then put Madrid back in front from the penalty spot, but the hosts were reduced to 10-men when Sergio Ramos pulled down Neymar inside the box 10 minutes later and Messi levelled once more from the spot.
A first defeat for Real in 32 games means Atletico Madrid remain top of the table thanks to their better head-to-head record against Los Blancos with Barca still in third.
"The league starts a new now," said Barca boss Gerardo Martino.
"More than the mathematical distance we were behind, the impression was people wrote us off. Atletico Madrid were always in the fight and I think that after this result we are too.
"We knew if we didn't win tonight it was over for us. We still don't have matters in our own hands, but we'll now fight till the end."
"I haven't seen it again and it is difficult for me to comment on the decisions of the referee because there were many.
"However, it was the key moment. We were winning 3-2 and controlling the game well, but it is much more difficult to control the game with a player less."
The game got off to a blistering start as after Neymar and Benzema had early efforts easily saved, Barca opened the scoring when Messi played in Iniesta behind the Real defence and the Spanish international smashed the ball in off the underside of the bar.
You’ve reached your limit of {{free_limit}} free articles this month.
Subscribe now for unlimited access.
Already subscribed? Log in
Subscribe to read the full story →
Smart Quarterly
₹900
3 Months
₹300/Month
Smart Essential
₹2,700
1 Year
₹225/Month
Super Saver
₹3,900
2 Years
₹162/Month
Renews automatically, cancel anytime
Here’s what’s included in our digital subscription plans
Exclusive premium stories online
Over 30 premium stories daily, handpicked by our editors


Complimentary Access to The New York Times
News, Games, Cooking, Audio, Wirecutter & The Athletic
Business Standard Epaper
Digital replica of our daily newspaper — with options to read, save, and share


Curated Newsletters
Insights on markets, finance, politics, tech, and more delivered to your inbox
Market Analysis & Investment Insights
In-depth market analysis & insights with access to The Smart Investor


Archives
Repository of articles and publications dating back to 1997
Ad-free Reading
Uninterrupted reading experience with no advertisements


Seamless Access Across All Devices
Access Business Standard across devices — mobile, tablet, or PC, via web or app
