Despite leading the table and being unbeaten in La Liga, Real were under pressure after Tuesday’s sluggish 2-2 draw at home to Club Bruges.
Eden Hazard finally scored his first goal for Real Madrid as his side beat second-placed Granada 4-2 in a highly entertaining game at the Santiago Bernabeu on Saturday to go four points clear at the top of La Liga.
Goals from Hazard, Karim Benzema and a stunning long-distance hit from Luka Modric gave Real a comfortable three-goal lead but a Darwin Machis penalty and a close-range strike from Domingos Duarte had the home fans dreading a late collapse.
Substitute James Rodriguez sealed the win with a goal in stoppage time, taking Real on to 18 points after eight games, while Granada are second on 14.
Madrid defender Dani Carvajal did not hide his unease about conceding the two late goals, which brought back memories of a nervy 3-2 win over Levante earlier this season.
"We can't afford to suffer like that after leading 3-0, we need to correct this tendency. We got away with it today and against Levante but if we keep doing this we're going to drop points," he told reporters.
"It's not a sign that we're very reliable and we need to be more ruthless but whatever happens this weekend we'll still be top."
Third-placed Atletico Madrid could move to within a point of Real when they visit Real Valladolid on Sunday, while champions Barcelona, on 13 points, play at home to Sevilla on Sunday.
Despite leading the table and being unbeaten in La Liga, Real were under pressure after Tuesday's sluggish 2-2 draw at home to Club Bruges in the Champions League.
They welcomed a Granada side who have taken the league by storm on their return to the top flight and had climbed into second spot thanks to a run of four wins in five games that included a 2-0 win over Barcelona.
Real were missing Marcelo, Ferland Mendy and Nacho so Carvajal had to deputise at left back, while goalkeeper Alphonse Areola came in for Thibaut Courtois, who was absent with illness and had been heavily criticised for his display against Bruges.
Zinedine Zidane's side got off to the ideal start, however, when Benzema knocked in an incisive pass from Gareth Bale in the second minute.
Hazard then scored for the first time since his 100-million-euro move from Chelsea to Real, lobbing over Granada keeper Rui Silva at the end of the first half.
The Belgian turned provider for Real's third goal, cutting in from the left wing and laying off the ball for Modric to drill into the top corner in the 61st minute.
Granada struck back in the 69th when Machis scored a penalty after a foul following a clumsy piece of goalkeeping from Areola, and they reduced the deficit to one goal with a close-range strike by Duarte following a corner.
The Andalusians could not threaten Real in the remaining minutes though and Benzema missed a chance to ease their nerves before Rodriguez finally sealed victory.