Los Blancos looked set to be heading for a shock defeat in Valencia but Morata leveled matters in the 90th minute before the Portuguese popped up with a late winner.Cristiano Ronaldo scored an injury-time winner as Real Madrid twice came from behind in a dramatic 3-2 victory over Levante on Saturday night.
The Blancos had first fallen behind to a fine finish from Baba Diawara 12 minutes into the second half and although they posted a swift reply through Sergio Ramos, Carlo Ancelotti's men looked set to suffer a shock defeat when Nabil El Zhar fired home with just four minutes to go.
However, Alvaro Morata netted in the dying seconds of normal time before Ronaldo fired home with just 30 seconds to go to spare Carlo Ancelotti's blushes.
The hosts came into the fixture unbeaten in their last six and coach Joaquin Caparros made just the three changes from their win over Osasuna, as David Navarro, Jordi Xumetra and Andreas Ivanschitz returned.
Carlo Ancelotti continued his rotation policy as he made five changes from the Champions League win over Copenhagen in midweek.
Iker Casillas, Pepe, Marcelo, Dani Carvajal and Asier Illarramendi all dropped to the bench, as Diego Lopez, Alvaro Arbeloa, Sergio Ramos, Fabio Coentrao and Isco came into the side.
Levante started the match confidently and on-loan Sevilla forward Diawara tried to catch former teammate Lopez off his line with an effort from around 35 yards, but the shot flew just over.
A minute before the break Lopez was the visitors' savior as Diawara hit a ferocious half-volley towards goal from range, but the keeper tipped it over the bar in dramatic fashion.
After cutting in from the right, Ronaldo struck the outside of the post in the 53rd minute with a left-footed shot and Levante made the most of its luck by opening the scoring.
Xumetra chipped a wonderful diagonal pass over the Madrid defense and Diawara guided the ball past Lopez for only his second Liga goal since May 2012.
Levante was not ahead for long, however, as Real restored parity in the 61st minute. Di Maria whipped an inviting corner towards the back post and Ramos stuck a foot out to direct it past Keilor Navas and into the goal.
Ancelotti's side was piling on the pressure by the 70th minute and Marcelo should have given the Blancos the lead, but he somehow missed the target from eight yards out following an excellent cutback from substitute Alvaro Morata.
El Zhar looked to have won the match for Levante with four minutes left as he held off his marker before shooting past Lopez, but the hosts would end up devastated by a late Madrid double.
Morata showed quick feet in the area before firing past Navas on 90 minutes, and then Ronaldo appeared in stoppage time to find the net via a wicked deflection, extending Madrid's unbeaten run away from home to 11 matches.