Jose Mourinho's side, who were knocked out of the cup by Barcelona in midweek despite a battling 2-2 draw at the Nou Camp, headed into the weekend five points clear of their fierce rivals at the summit but went behind to Angel Lafita's 11th-minute opener.
However, Kaka equalised just after the half-hour mark and Cristiano Ronaldo put the hosts ahead at the start of the second period before Mesut Ozil sealed the turnaround.
The result moved Madrid provisionally eight points clear at the top, ahead of Barca's late kick-off at Villarreal.
Karim Benzema had half a chance in the seventh minute when he connected with Ronaldo's cross, but he could only send a weak header wide.
Zaragoza took a surprise lead four minutes later when Luis Garcia's quick free-kick played in Carlos Aranda, who crossed for Lafita to beat Iker Casillas from close range.
Madrid immediately set about getting back on level terms, Esteban Granero blasting over the bar and Benzema seeing an effort blocked by Maurizio Lanzaro.
Kaka went close to restoring parity in the 26th minute from Ozil's free-kick, but his neat flicked header drifted just wide.
The Brazil playmaker had another chance soon after when Marcelo's cross from the left teed him up in space on the penalty spot, but he lost his footing and skewed his shot wide.
Kaka did get his side back on level terms in the 32nd minute, though, squeezing his shot past Zaragoza keeper Roberto after being played in by Ricardo Carvalho down the left side of the penalty area.
Ronaldo flashed a free-kick wide in the 36th minute as the hosts looked to forge ahead before the interval.
It was not to be, but the home fans were celebrating the second goal within four minutes of the restart as Ronaldo tapped home Mesut Ozil's cross from the right. The visiting defence appealed for offside against the Portugal forward but the linesman's flag stayed down.
Seven minutes later it was 3-1, Ozil applying the finish by lashing a left-footed shot past Roberto from a tight angle after a slick build-up involving Granero and Kaka.
Madrid strolled through the remaining 34 minutes without looking in any real danger of relinquishing their lead, although Zaragoza - beaten 6-0 by Mourinho's men in their season opener at La Romareda - did ask a couple of questions of their hosts.
First Casillas had to be alert to parry a Luis Garcia corner, and the Spain keeper then looked on as attempts from Luis Garcia and Lafita flew off target.
Helder Postiga burst through in the 71st minute and got his shot away well under pressure from Carvalho, but the Portuguese was denied by Casillas.
Ronaldo appealed for a penalty 15 minutes from time, claiming a nudge in the back from Ivan Obradovic when he was clean through, but the referee was having none of it.