Zinedine Zidane's side entered the match having lost their last two league fixtures on home soil, and they fell behind to the relegation-threatened visitors in the 23rd minute of the contest.
Los Blancos then scored seven times without reply, however, to return to fourth position in La Liga ahead of Villarreal. The reigning champions are now 16 points off league leaders Barcelona on the same number of fixtures.
Deportivo's first half-chance of the match arrived in the 16th minute when Adrian Lopez found Pedro Mosquera inside the home side's box, but the number five could only poke into the arms of Keylor Navas.
The visitors were ahead in the 23rd minute, however, when Adrian Lopez tapped a low Lucas Perez cross into the back of the net from close range as the Bernabeu was stunned into silence.
Marcelo volleyed just wide three minutes later, before Deportivo goalkeeper Ruben made a stunning save to keep out a point-blank header from Ronaldo. Casemiro then nodded wide from the resulting corner as the pressure increased.
The post came to Deportivo's rescue just before the 30-minute mark after Ruben allowed a Marcelo strike to squirm under his body, but Real Madrid did deservedly level the scores two minutes later when Nacho, who was picked out by Marcelo, found the far corner from inside the box.
The home side then took the lead in the 42nd minute when Bale picked out the top corner with a super curling effort having collected a deep cross from Marcelo.
Real Madrid had three excellent opportunities to score a third in the first six minutes of the second half, but Ronaldo passed up a chance from inside the Deportivo box, before Modric and Mayoral also failed to hit the target from promising positions.
Ruben then made a quite sensational save to deny Casemiro from close range, but Real Madrid had their third in the 58th minute when Bale headed a Toni Kroos corner past the Deportivo goalkeeper from close range.
Mayoral headed a Bale cross just wide of the post in the 63rd minute, and the Spaniard was replaced moments later as Benzema made his return from injury off the bench.
It was the first time all season that Bale, Benzema and Ronaldo had all been on the field at the same time, and Real Madrid scored their fourth shortly after - Modric firing home from the edge of the box following a flick from Ronaldo.
Andone had two brilliant chances to hit back in the period that followed, but the striker turned his first effort over the crossbar from close range, before seeing his second cleared off the line by Nacho.
Ronaldo fired just wide of the Deportivo post in the 72nd minute as chances continued to arrive, and the Portuguese finally got his name on the scoresheet in the 78th minute when he turned a Casemiro cross home from close range.
Ronaldo thought that he had scored a second moments later when he converted a cross from Bale, but the offside flag was raised.
The number seven did make it 6-1 in the 84th minute, however, when he headed a Lucas Vazquez cross into the bottom corner. It came at a price, though, as a kick to the face left the attacker bloodied, and indeed unable to finish the match.
The scoring was not finished, however, with Nacho netting his second of the match in the 88th minute as the centre-back swivelled inside the box before turning home.
REAL MADRID (4-3-3): Navas; Carvajal, Varane, Nacho, Marcelo; Kroos, Casemiro, Modric (Kovacic 76'); Ronaldo, Mayoral (Benzema 64'), Bale (Lucas 82')
DEPORTIVO (4-3-3): Ruben; Juanfran, Schar, One, Luisinho; Guilherme, Borges (Colak 54'), Mosquera (Edu 49'); Adrian, Andone (Gil 79'), Perez