Goals from Denis Suarez, Lionel Messi, Luis Suarez and Neymar handed Barca the win that closes the gap at the top of the table, though they have played a game more than Real.
Earlier, second-placed Sevilla survived a late scare to triumph 4-3 over Osasuna in an entertaining La Liga match at Estadio El Sadar.
They were on the back foot early on after Sergio Leon opened the scoring 15 minutes in, but they recovered well and went into half time level at 1-1 after Iborra equalised in the 43rd minute.
However, the Spanish midfielder then put the ball into his own net to gift the lead back to Osasuna in the 63rd minute, before he then completed his brace to bring Sevilla level for a second time in the 65th minute.
Franco Vazquez put them ahead for the first time in the match in the 80th minute before Pablo Sarabia seemed to put the result beyond doubt when he made it 4-2 two minutes into second half injury time.
Kenan Kodro did score less than 60 seconds after the restart to give Sevilla a late scare, but it turned out to be nothing more than a consolation goal.
Elsewhere, Juanmi's 72nd minute strike was enough to earn Real Sociedad a 1-0 win over Celta Vigo at Estadio Anoeta, while Betis and Gijon played out to a dull 0-0 draw at Estadio Benito Villamarín.
And finally, Atletico Madrid needed a late Antoine Griezmann goal to earn a 2-2 draw against a plucky Athletico Bilbao outfit at Estadio San Mames.
Koke got them off to an ideal start by opening the scoring as early as the third minute, but they went into half time level at 1-1 after Lekue struck for the hosts in the 42nd minute.
Bilbao used that momentum after the break to grab an unexpected lead through Oscar de Marcos in the 56th minute before Griezmann saved Atleti's blushes with an 80th minute equaliser to earn them a point.