With Barcelona having wrapped up the league and Real preparing to play in the Champions League final later in the month, the Clasico lacked some of the hype that normally precedes it, but the match was thrilling encounter across the 90 minutes.
Barcelona were on the front foot from the off and found their opener on 10 minutes when Luis Suarez smashed a first-time volley from an inch-perfect Sergi Roberto cross past Keylor Navas.
But Real struck back before the quarter-hour through Cristiano Ronaldo, who tapped home a headed Karim Benzema pass from close range after some nice build-up play from Zinedine Zidane's team.
The strike from Ronaldo put the Portuguese level with Real legend Alfredo Di Stefano for the second-most Clasico goals of all-time at 18. Lionel Messi has the most with 25.
The match grew testy as the first half wore on, with Messi handed a yellow card for a hard tackle on Sergio Ramos and Roberto being shown straight red for violent conduct after throwing a punch at Marcelo before half-time.
In between those two cards, Bale escaped punishment after a late tackle on Samuel Umtiti that had the Barcelona dugout crying foul.
Ronaldo, who picked up a knock while scoring his goal, was substituted at half-time, with the team telling reporters he suffered a slight ankle sprain, and would not be risked in the second half.
Down to 10 men, Barcelona took the lead against the run of play when Suarez picked out Messi at the top of the Madrid penalty area and the Argentine took two touches to his left and curled a shot in at the near post to make the score 2-1.
Messi nearly had his second on 70 minutes, but Navas did well to keep hs shot out after Suarez had sprung him behind the Madrid defence.
And the miss would prove costly for Barca when Bale scored with a spectacular first-time shot two minutes later, curling the ball around Marc-Andre ter Stegen from a Marco Asensio assist.
With both teams chasing a winner, Marcelo had a legitimate penalty shout waved off before Navas again kept Messi at bay, parrying away the Barca striker's shot from a difficult angle on the right side of goal.
The result keeps Barcelona's unbeaten season in La Liga going with three games remaining in their season.
Both teams are in action on Wednesday, with Barcelona hosting Villarreal and Real heading to the Estadio Ramon Sanchez Pizjuan for an away match against Sevilla.