The visitors came from behind to earn a remarkable victory at Camp Nou, in a result that simultaneously dents the hosts' title hopes and boosts those of Atletico Madrid.
Cristiano Ronaldo struck after a red card for Sergio Ramos to snatch a 2-1 Clasico victory for 10-man Real Madrid over Barcelona in La Liga on Saturday.
Both sets of players and a capacity Camp Nou crowd paid a moving pre-match tribute to the late Johan Cruyff but there was little of the footballing magic the Dutchman made his calling card during a fitful contest in Catalonia.
Lionel Messi was forced to feed off scraps in search of his 500th Barcelona goal, although he drew an excellent save from Keylor Navas before Gerard Pique headed the hosts into a 56th-minute lead.
Karim Benzema showed superb awareness and technique to volley Madrid level and there was justifiable fury from the visitors when Gareth Bale had an 80th-minute header ruled out for an apparent foul on Jordi Alba.
Madrid's burgeoning confidence might have been checked when Ramos' concluded a rash outing with his second booking seven minutes from time, but Ronaldo's 16th goal against Barcelona stunned the Camp Nou masses and handed Luis Enrique's team their first defeat for 24 Liga matches.
Champions Barcelona are six points ahead of Atletico Madrid at the summit with seven matches remaining this season, while Madrid are a point further back, coach Zinedine Zidane having made a convincing pitch for his long-term job prospects at the Santiago Bernabeu.
After Cruyff was honoured with a stadium-spanning mosaic and a minute's silence, Luis Suarez wasted a glorious chance to give Barcelona a 10th-minute lead.
A misjudgement from Madrid captain Ramos, passed fit following a back problem, left Neymar and Suarez tearing towards goal – although the Uruguay star got his feet tangled and failed to convert at the back post when his team-mate squared.
Navas did not make a save until he parried Ivan Rakitic's stinging 21st-minute shot, while the already booked Ramos was not punished when he brought down Messi on the edge of the Madrid box.
Bale and Ronaldo carried growing menace for the visitors as the half progressed but they were struggling to create openings as marauding Barca full-back Dani Alves blazed over.
When a chance fell to their forward colleague Benzema on the penalty spot a minute from the break the France international clattered his volley hopelessly into orbit.
Ramos continued to teeter on his disciplinary tightrope when he brought down Suarez three minutes into the second half – Messi fired the resulting free-kick over.
The mercurial Argentina star called Navas into action in the 54th minute with a sumptuous lob that the goalkeeper impressively clawed out of his top left corner.
A flurry of corners followed and Madrid were unable to withstand the pressure as Pique slipped away from Pepe to send a thumping header into the net from Rakitic's right-wing delivery.
The lead would only last six minutes as Madrid full-back Marcelo fed Toni Kroos at the end of a driving run.
Germany midfielder Kroos tried to steer a pass across the box, with the ball deflecting off Jordi Alba, but Benzema was alert to the possibilities and swivelled to acrobatically volley home.
Barcelona needed a brilliant last-ditch tackle from Javier Mascherano to deny Ronaldo and Suarez flashed wide on the end of Messi's raking pass before Bale had his celebrations cut short by the officials.
The Wales international simply appeared to time his jump better than Alba, climbing above the full-back to dispatch Ronaldo's cross but referee Alejandro Jose Hernandez Hernandez chalked off the goal following a conversation with his assistant.
Ramos' luck eventually ran out when he dived in on Suarez but Ronaldo would not allow that to stem the victory charge.
The three-time Ballon d'Or winner chested down Bale's deep right-wing cross at the back post and buried an unerring finish beyond Bravo, peeling away to delight in the home supporters' silence.