The hosts came into the game unbeaten in their opening four games. They had picked up three wins and one draw, and were looking to keep the juggernaut rolling.
The first half flew by with little or no major highlights as clear-cut chances were at a premium on both sides of the pitch.
The second half was sparked into life 21 minutes after the interval when Hugo Duro broke the deadlock to put Valencia ahead.
The Spanish forward reacted faster to Lucas Vazquez's tame clearance to tuck home what was his first goal of the season.
However, Real Madrid upped the ante and were in the ascendancy from there on. They probed the Valencia defenders in search of a way back into the game.
With the game nearing a close, Vinicius Junior and Karim Benzema came up trumps for Carlo Ancelotti's men. They scored in a two-minute spell to turn the game on its head.
The result saw Real Madrid move into top spot in the La Liga standings, leapfrogging defending champions Atletico Madrid. Meanwhile, Valencia dropped to third place, level on 10 points with Real Sociedad.
Real Madrid player ratings
Thibaut Courtois - 6.5/10
The Real Madrid goalkeeper made several vital stops to keep his side in the game. There was very little he could have done about Hugo Duro’s opener.
Dani Carvajal - N/A
The ever-present full-back trudged off the pitch with a 26th-minute injury and was replaced by Lucas Vazquez.
Eder Militao 5.5/10
The Real Madrid defender had an unconvincing evening. He struggled to get going in the game and was easily beaten aerially. He won none of his duels in the air and completed just three of his ground battles. He gradually grew into the game and was on deck to help out his side at the defensive end of the pitch on a few occasions.
Nacho Fernandez - 5.5/10
The Real Madrid full-back had a shaky outing as he was easily edged out by the Valencia frontmen. However, he was decent going forward on occasions and created as he created one chance in the game.
David Alaba - 7/10
The versatile defender put in a clinic at the heart of the defense as he was on deck to snuff out any danger. He finished with a game-high seven clearances and two tackles, and was very accurate with his passing.
Federico Valverde 6.5/10
A solid performance from the tireless midfielder. Federico Valverde completed lots of ground down the right for Real Madrid. He marauded to and fro helping out at both ends of the pitch.
Casemiro - 5/10
It was a poor performance from the Real Madrid star, who is clearly yet to hit his stride this season. Although his passes were mostly neat and accurate, he was guilty of sloppiness and few harsh tackles. He also contributed little or nothing on attacking fronts.
Luka Modric - 5/10
The veteran struggled to make his mark in the center of the park for Real Madrid. He lost possession far too easily and offered little defensively. He gradually grew into the game. But he was hooked off after Hugo Duro’s goal as Ancolleti opted for more attacking firepower in search of a comeback.
Eden Hazard - 7/10
The Real Madrid forward was one of the best players on the pitch as he appeared to be gradually finding his mojo. He caused Valencia's defense a lot of trouble with his silky, dazzling dribbles and adept reading of the game.
Karim Benzema - 7.5/10
The Real Madrid striker tried his best to drag his side into the game after falling behind. He showed excellent hold-up play and linked up well with his fellow frontmen. A proper striker's finish for the winner as he fought hard to connect his head to the ball to nod home the winner with two minutes remaining on the clock.
Vinicius Junior - 8/10
A man-of-the-match performance from the Brazilian attacker who appears to have finally found his rhythm at Real Madrid. He leveled the scores with a fine strike before setting up Benzema to complete the comeback. He drew fouls from the Valencia players and was a constant threat all game. A man reborn.
Player ratings for Real Madrid substitutes
Lucas Vazquez - 6/10
He came on for the injured Carvajal and had an industrious performance. However, he had a moment to forget as he gifted Valencia the opener with a dreadful error. Other than that, he had a solid performance off the bench.
Rodrygo - 6/10
The Real Madrid youngster injected fresh life into the attack and came close to making an immediate impact, but could only fire his effort wide.
Eduardo Camavinga - 6/10
The newly-signed forward came on for the struggling Casemeiro and put in a solid 23-minute cameo. He completed all his long balls, aerial duels and dribble attempts.
Luka Jovic - 5/10
He came on with 12 minutes remaining on the clock and made little or no impact off the bench.
Isco - 5/10
The Spaniard came on for Valverde and made no impact contribution.