In-form Athletic had threatened to add to Madrid's misery following their 2-1 home loss to Barca in the first leg of their cup quarter-final tie when Fernando Llorente gave them an early lead.
However, Jose Mourinho's men drew level soon after through Marcelo before two second-half penalties from Cristiano Ronaldo and a late goal from Jose Callejon helped Madrid stay clear of second-placed Barca, who beat Malaga 4-1 earlier on Sunday.
Athletic played out the final 24 minutes with a man less after Oscar De Marcos was dismissed in the incident that led to Ronaldo's second successful penalty as the Basque side suffered only a second defeat in 15 league games.
Madrid would have been desperate for a good start on Sunday following yet another defeat to Barca, but they found themselves trailing after just 13 minutes following a clinical Athletic counter-attack.
The move started with goalkeeper Gorka Iraizoz quickly throwing the ball out to Javi Martinez, who in turn fed possession inside to Ander Herrera before racing down the wing to pick up a return pass from his team-mate. Martinez then floated over a deep cross into the area where his Spain colleague Llorente volleyed home his 11th goal of the season.
It should really have been 2-0 six minutes later as well.
Fortunately for the hosts, De Marcos failed to turn the rebound in from close range after Iker Casillas parried a shot from Iker Muniain.
De Marcos really should have scored with that chance and Madrid made the most of their let-off to equalise soon after.
Karim Benzema volleyed a good opening well over in the 24th minute, but 60 seconds later Marcelo coolly slotted in the equaliser after playing a one-two with the Frenchman on the edge of the area.
Benzema saw a header saved by Iraizoz as Madrid sought a half-time lead, but they survived another big scare in the 39th minute when Llorente missed a great chance for the visitors, the powerful striker slicing horribly wide with his left foot with only Casillas to beat.
Madrid may have been fortunate to have been level at the interval, but they dominated the second half and were in front after winning a penalty just 30 seconds after the restart.
Ander Iturraspe was penalised for tugging back Kaka, and from the resulting spot-kick Ronaldo slammed in his 22nd league goal of the season.
That drew him level with Lionel Messi at the top of the scoring charts following the Barcelona player's hat-trick against Malaga, and the world's most expensive player soon passed the Argentinian after Madrid won another penalty in the 67th minute.
Ozil went down under a challenge from De Marcos and although Benzema fired in the loose ball, the penalty had already been awarded.
De Marcos was shown a red card and Ronaldo added the full punishment from 12 yards as he sent Iraizoz the wrong way.
Mourinho immediately replaced Benzema with Gonzalo Higuain and the Argentina international twice came close to adding to his side's lead, first being denied by a brilliant save from Iraizoz before later hitting the near post after rounding the Athletic custodian.
It was another substitute who added a late fourth, though, as Callejon latched onto Higuain's perfect through-ball to slot past Iraizoz and complete a convincing triumph.