Los Blancos entered the La Liga clash having lost three of their last four matches in all competitions, but could not return to form in front of their own fans as the pressure was cranked up on head coach Julen Lopetegui.
The result has left the European champions, who travel to Barcelona next weekend, down in fifth position in La Liga, although they are only three points off the top of the table.
There were whistles in the Bernabeu after the first goal went in, but it got worse in the 12th minute when Varane was adjudged to have handled inside the box.
Roger Marti stepped forward to send Levante 2-0 ahead from the penalty spot inside what was an incredible 13 minutes of football in the Spanish capital.
Madrid thought that they had halved the deficit in the 17th minute when Marco Asensio nodded home from close range, but following a VAR review, the Spaniard's effort was chalked off, much to the frustration of the home fans.
Los Blancos then had two super chances in the period that followed, but Levante goalkeeper Oier was equal to efforts from Lucas Vazquez and Sergio Ramos, the second of which was a brilliant point-blank save.
Real Madrid were having plenty of the ball as the match approached its 30-minute mark, with Marcelo having one cleared off the line as Levante looked to defend their two-goal advantage.
Oier again saved from Vazquez in the 33rd minute, before Mariano Diaz hit the crossbar with a header moments later.
Morales was the star of the show in the first period, however, with the attacker continuing to cause Real Madrid problems with his pace and trickery in forward positions.
Levante had the ball in the back of the net for a third time in the 43rd minute when Ruben Rochina converted from close range, but the offside flag came to Real's rescue, and 2-0 was therefore the scoreline at the break.
Oier had to keep out a Luka Modric effort in the 51st minute after a clever pass from Isco, and the score stayed 2-0 in the 56th minute, meaning that Real had gone 465 minutes without scoring, the longest run in their entire history.
Oier made an even better stop to keep out a Bale free kick in the 66th minute, before Mariano headed wide of the post 20 minutes from time as Levante's two-goal lead remained in tact.
Real Madrid finally found the back of the net in the 72nd minute, however, when Marcelo collected a pass from Benzema before finding the back of the net with a wonderful strike.
Benzema curled one against the post in the 76th minute as Real looked for a leveller, before Marcelo struck over the crossbar 10 minutes from time.
Mariano then tested Oier in the 88th minute, before the centre-forward had a goal disallowed for offside moments later as the celebrations quickly turned to heartache.
The pressure continued into the four minutes of added time, but Levante held on to record a famous win, which could end up costing Lopetegui his job.
REAL MADRID (4-3-3): Courtois; Odriozola (Bale 46'), Varane, Ramos, Marcelo; Modric, Casemiro, Isco (Benzema 60'); Asensio (Ceballos 60'), Mariano, Lucas
LEVANTE (3-5-2): Oier; Cabaco, Postigo (Chema 76'), Rober; Jason, Bardhi, Rochina (Doucoure 67'), Campana, Tono; Morales, Marti (Boateng 79')