Nou Camp outfit edge past arch rivals.
Barcelona took the lead in this crucial El Clasico fixture with defender Jeremy Mathieu headed in a delicious Lionel Messi cross.
Luis Suarez pulled off a rather ridiculous dive soon after, earning Pepe a yellow card.
Cristiano Ronaldo leveled matters on the half hour mark, clinically firing past Claudio Bravo.
Cristiano Ronaldo was then soon in the referee’s book, the Real Madrid star guilty of simulation.
Welshman Gareth Bale then appeared to have given the away side the lead only for the goal to be, wrongly, disallowed for offside.
Luis Suarez then fired in what proved to be the winner, expertly taking down Dani Alves’s raking pass, before sliding it home past Iker Casillas.
Late on Cristiano Ronaldo was perhaps fortunate to not earn a second yellow following a tangle with Javier Mascherano.