Real kept pace with their city rivals with four first-half goals of their own in a 6-1 win at Real Betis
Lionel Messi took just three minutes to score on his return from injury as Barcelona thrashed Deportivo la Coruna 4-0 on Saturday, but Barca remain two points adrift of free-scoring Atletico Madrid and Real Madrid.
Yannick Carrasco's hat-trick and Nicolas Gaitan's first two goals for Atletico inspired a storming fightback by Diego Simeone's men to flatten Granada 7-1 after falling behind early on.
Real kept pace with their city rivals with four first-half goals of their own in a 6-1 win at Real Betis to snap a streak of four straight draws.
Barca were already 3-0 up thanks to Luis Suarez and a double from Rafinha when Messi was introduced after nearly a month out with a groin problem and wasted no time in scoring his ninth goal of the season.
"It was a complete performance," said Barca boss Luis Enrique.
"We have Leo back and it took him no time to be back in top form."
Messi wasn't needed to be the match winner as Barca had the three points sewn up before the break.
Rafinha exchanged a one-two with Suarez before drilling a low shot that had too much power for German Lux and then bundled home a second 15 minutes later after Lux had saved Gerard Pique's initial effort.
Suarez moved level with Antoine Griezmann as La Liga's top scorer with six this season when he brilliantly turned away from the Deportivo defence when receiving Neymar's through ball before slotting home the third.
Messi was introduced from the bench just before the hour mark and took just three touches to find the net when he flicked another Neymar assist over the helpless Lux.
Deportivo's day was rounded off by a red card for Laure 25 minutes from time when for elbowing Neymar in the face.
Real had dropped down to fourth due to results earlier in the day, but roared back to a share of the lead and put a poor run behind them with their best display of the season to blow Betis away.
"When we play with the intensity required it makes it very difficult for the opponent," said a relieved Madrid boss Zinedine Zidane.
"We have worked on that, but we need to be consistent. This match is a reference point."
Raphael Varane headed home Toni Kroos's free-kick before the German also teed up Karim Benzema to double the visitors' advantage.
Marcelo's mishit effort found the far corner for Real's third, but there was no such luck needed for a stunning fourth as Madrid marched from one end of the field to the other in seconds before Isco rounded off a stunning team move.
Betis improved at the start of the second period and got their reward through Alvaro Cejudo's consolation.
However, Madrid's quality shone through once more when Isco curled expertly into the top corner before Cristiano Ronaldo got his name on the scoresheet 12 minutes from time.
Real still trail Atletico on goal difference as Los Rojiblancos went one better in smashing seven past Granada.
"The response from the team was tremendous," Atletico boss Simeone told BeIN Sports Spain.
The Vicente Calderon was briefly stunned by Isaac Cuenca's sensational volley from outside the area to open the scoring.
Carrasco turned the game around before half-time thanks in part to some poor goalkeeping from Guillermo Ochoa.
However, the Mexican was faultless as Carrasco completed his hat-trick with a thumping finish from Griezmann's fine cut-back on the hour mark.
"I'm very happy to score three goals, it is the first hat-trick of my career," added Carrasco.
"I already have many happy memories here at Atletico and hopefully I have many more to come."
Gaitan had only been on the pitch a minute before he added a fourth and then fired in his second nine minutes from time at Ochoa's near post.
And Carrasco teed up two more for Angel Correa and Tiago in the final five minutes as Atletico made light of a dependence on Griezmann for goals so far this season.
Sevilla are just a point behind in third after ending a 17-month wait for an away league win in a 3-2 triumph at Leganes.
Franco Vazquez and Samir Nasri put Jorge Sampaoli's men well on course to end that barren run before David Timor and Alexander Szymanowski brought Leganes level.
However, Pablo Sarabia proved the match winner off the bench when he curled a stunning winner into the top corner five minutes from time.