This was Ronaldo's second winner for Madrid on the last shot of the game in the last seven days after he netted a penalty six minutes after fulltime to grab a 2-1 win at Elche last Saturday.
The Portugal forward has seven goals in league play - one less than Messi and Atletico Madrid's Diego Costa - and 12 goals in 10 games in all competitions this season.
The victory put Madrid back in third place, five points behind Barcelona and two points behind Atletico before it hosts Celta Vigo on Sunday.
It also saved Ancelotti from even more pressure following the loss to Atletico last weekend. Although his team's lackluster performance through most of the game will likely earn him more criticism.
"People need to be patient," Morata said about the Madrid supporters who jeered Ancelotti in the last two home games. "There have been a lot of changes recently. We will play better, for sure."
Barcelona extended its club record with an eighth win in as many games to start the league under new coach Gerardo Martino. Madrid holds the league milestone of nine wins to start the season in 1968.
Alexis' long blast in the 14th canceled out Javi Guerra's 10th-minute opener for Valladolid.
Xavi Hernandez slotted in Barcelona's second in the 52nd before Neymar set up Alexis in the 64th. Alexis then returned the favor by generously passing back for Neymar to net his goal in the 70th.
"Neymar didn't put on a Messi mask, each one plays his own game," Alexis told GOL TV. "I don't think that the fact Messi isn't here gives us more freedom. Without Leo we have more work because with him everything is easier."
Elsewhere, Real Sociedad lost its second game this week in agonizing fashion, when Rayo Vallecano substitute Jonathan Viera won and converted an 89th-minute penalty. Sociedad lost in injury time at Bayer Leverkusen in the Champions League on Tuesday.
Elche got its second straight victory thanks to forward Ferran "Coro" Corominas' two goals in a 2-1 win over visiting Espanyol.
Without the injured Gareth Bale, Madrid could do very little to disarm Levante's stingy defense in the first half at a Ciutat de Valencia Stadium where it had lost in two of its previous three visits.
Since suffering a 7-0 thrashing at Barcelona in the league opener, new coach Joaquin Caparros - known for his focus on defense - had steered Levante to a six-game undefeated streak that it almost kept going considering it never trailed Madrid until stoppage time.
"It hurts to lose like this," Caparros said. "It's a pity. We did everything we could to win and the game lasted four minutes too long. We should have known how to manage the situation. El Zhar's goal should have given us more oxygen but that didn't happen. Some of my players showed their lack of experience."
After a foul-ridden first 45 minutes, Levante opened through striker Babacar "Baba" Diawara in the 57th.
Madrid was caught pressing forward when Levante got a three-on-two breakaway, and midfielder Jordi Xumetra floated a cross for Baba to beat goalkeeper Diego Lopez with a right-footed volley.
Sergio Ramos leveled four minutes later when the Madrid center back raced in at the second post and slammed in Angel Di Maria's corner kick.
Madrid was again caught looking to score late when El Zhar did well to fend off Ramos in the area before he spun and fired in the ball.
But Morata, who scored a late winner for Madrid here last season, coolly drove in his goal to finish a move started by fellow youngster Jese Rodriguez before Ronaldo pulled out his late heroics.
On Sunday, it's: Sevilla vs. Almeria, Getafe vs. Real Betis, and Athletic Bilbao vs. Valencia.