A stuttering start by Jose Mourinho’s Real side had left them eight points behind their great rivals after six matches, threatening to derail their title defence before it had even got off the ground.
While they will take comfort from preventing Barca making it seven wins out of seven this term, they may feel they let slip an opportunity in the opening league ‘Clasico’ of the campaign after Ronaldo gave them a 23rd-minute lead in front of almost 100,000 fans packed into an electric Nou Camp arena.
With millions more around the world watching the heavyweight clash, Messi levelled eight minutes later after a defensive lapse by Pepe and the Argentine World Player of the Year curled in a stunning free kick just after the hour to make it 2-1.
Real were level within five minutes when Mesut Ozil slid the ball through to Ronaldo and the Portuguese forward beat Victor Valdes for a second time with a powerful low strike.
Barca twice came close to a winner in a frenetic finale when substitute Martin Montoya crashed a long-range effort against the crossbar in the 89th minute and Pedro dashed on to an Andres Iniesta pass in stoppage time, only to fire wastefully wide.
“We were superior at times but it was a very even game,” Barca midfielder Sergio Busquets said in an interview with Spanish television.
“Everything is the way it was but with one match less,” added the Spain international.
Barca have 19 points from seven games, level with Atletico Madrid, who snatched a last-gasp 2-1 win at home to third-placed Malaga at the Calderon in today’s late kickoff.
Real, who have already lost twice, the same number of defeats as they suffered in the whole of last season, are fifth on 11 points.
With the world’s two richest teams meeting in probably the biggest fixture in international club soccer, Messi and Ronaldo continued their personal goal-scoring duel on a balmy night in the Catalan capital.
Ronaldo’s double made him the first player to score in six ‘Clasicos’ in a row, while Messi’s 16th and 17th strikes in Real-Barca matches put him one short of the leading marksman, Real great Alfredo Di Stefano.
Ronaldo’s first of the night came when Karim Benzema played him through on the left of the area and he struck a powerful low shot just inside Valdes’s post.
Pepe collapsed in a heap in the area allowing Messi to volley in the equaliser before last year’s La Liga top scorer thrilled the home support with a spectacular 30-metre effort that left Spain keeper Casillas flapping at thin air.
Ronaldo then netted his 10th ‘Clasico’ goal when he raced on to Ozil’s fine through ball and scored with another powerfully-struck low shot.
“The result is perfectly suited to the match, which was very good and which the whole world enjoyed, just like myself and the players from both teams,” Mourinho told a news conference.
“I prefer to focus on that because it’s the true reflection of the game, well contested and without knowing until the last moment who was going to win,” the Portuguese added.
“The league is how it was, my team pleased me a great deal and the world is happy.”
Radamel Falcao put Atletico ahead in the sixth minute at the Calderon with his eighth of the campaign, level with Messi and Ronaldo at the top of the La Liga scoring chart, before Roque Santa Cruz levelled for Malaga shortly before the break.
Colombian Falcao was involved in the winner in added time but the ball was adjudged to have gone in off defender Weligton to give Atletico their sixth win of the season.