Levante captain Jose Luis Morales’ stunning finish saw Real Madrid lose 1-0 at Ciutat de Valencia as Eden Hazard limped off during the second half.
Barcelona had earlier replaced Los Blancos at the top of LaLiga after cruising past Eibar 5-0 earlier on Saturday to move two points clear.
Zinedine Zidane’s side then came up short as Levante battled to a memorable victory after Morales lashed the ball past Thibaut Courtois with 11 minutes left.
Real Madrid must now regroup quickly – with a Champions League clash against Manchester City on Wednesday night followed by hosting El Clasico.
Wales forward Gareth Bale, who has been struggling with illness, missed out as Luka Modric and Isco came back into the starting XI, while Hazard was again in attack after his comeback from a knee problem.
It was a bright start by Los Blancos and after 11 minutes, Karim Benzema was played in by Isco but Levante keeper Aitor Fernandez was out quickly to block.
As half-time approached, Benzema was slipped into the left side of the penalty area but his cut-back was just behind Hazard, with Fernandez then beating away a 20-yard snapshot from Modric.
Levante, who had lost five of their last six league fixtures, came out on the front foot after the break with Enis Bardhi curling his shot wide after cutting inside from the left.
Courtois had to knocked the ball behind for a corner after a mix-up with captain Sergio Ramos before Real Madrid regained composure.
Hazard spurned a great chance to open the scoring when he was sent clear after 53 minutes.
The Belgian, though, could not get the ball out from under his feet before miscuing a shot as the Levante defence recovered.
The home side threatened again on the break as the hour mark approached, with Borja Mayoral hitting a low drive at Courtois from the edge of the penalty area when he had players in support on the overlap.
Benzema then beat the offside trap but could only crash his shot into the side-netting.
Ramos hacked the ball clear after Marcelo had been caught in possession, before Hazard’s evening came to an early end when he limped off in the 67th minute and was replaced by Vinicius Junior.
Levante were enjoying their best spell of the game, with Los Blancos forced into some last-ditch defending to hold their line.
The home side finally made the breakthrough with 11 minutes remaining.
Morales was played clear down the left channel and as the ball dropped into the penalty area, the forward lashed a half-volley past Courtois into the top near corner – as the Belgian goalkeeper pulled his hands away expecting the ball to fly over.
Real Madrid looked for an instant response but Benzema’s effort was off target.
At the other end, defender Raphael Varane make a goal-saving tackle as Mayoral looked to tap in a second after more good build-up from Levante.
The visitors pressed during the closing stages, with Ramos’ downward header flying straight at the goalkeeper deep into stoppage-time as Los Blancos saw their 15-game unbeaten league run ended.