Ronaldo hits 200 as Real keep Barca waiting
The result cut Barcelona's lead at the top to eight points and although they can't now mathematically seal the title with a win over Real Betis on Sunday, they can restore their 11-point lead with just four games remaining.
And defender Pepe said afterwards it is important to keep going until the end of the season just in case Barca struggle to get across the line.
"We need to do our job and then see what happens," he told Canal Plus.
"We are representing a very big institution that is Real Madrid and we need to have respect for that. Therefore, we need to face every game like this even if theoretically it doesn't matter.
"We conceded a lot of goals, we didn't start the game well and I think we have to pressure a little more, but in any case we managed to react."
The hosts had been caught cold early on when a slack crossfield pass from Angel Di Maria was intercepted by Oscar Gonzalez and he galloped clear behind the Real defence before slotting past Lopez at his near post.
The goal seemed to spark Madrid into life though and after Kaka had forced Jaime Jimenez into a fine flying save, they were level on 26 minutes when Di Maria cut inside and saw his goalbound drive deflected into his own net by Valiente.
Jose Mourinho's men continued to force the pace after drawing level and went in front six minutes later as Ronaldo rose highest to meet Di Maria's in-swinging cross to flick home his 32nd league goal of the season.
Just three minutes later Valladolid were level again though as a wonderful pass from Oscar released Omar Ramos down the left and his low cross was turned in at the far post by Guerra.
The hosts were back in front just three minutes after the restart as Karim Benzema played in Kaka and Jaime couldn't keep the Brazilian's shot out despite getting a hand to it.
Ronaldo then just failed to get over Fabio Coentrao's cross as another headed effort drifted over before Mourinho introduced Mesut Ozil and Xabi Alonso in a bid to finish the game off.
And 21 minutes from time Ronaldo remarkably brought up his double century in Madrid colours after just 196 games as he powered another header into the far corner from Mesut Ozil's corner.
However, the goal of the day was still to come as Oscar gave Valladolid some late hope with a sensational volleyed strike from fully 30 yards into Lopez's bottom left-hand corner.
Real's lead over neighbours Atletico in third is now eight points after Los Rojiblancos could only manage a 0-0 draw at Deportivo La Coruna, which also keeps the Galicians just a point above the drop zone.
Earlier, Valencia kept up their hopes of catching Real Sociedad in the final Champions League place as they destroyed nine-man Osasuna 4-0.
Roberto Soldado, Ricardo Costa, Ever Banega and Jonas got the goals for the hosts, whilst Osasuna had Alejandro Arribas and David Timor sent-off after the break.
And Osasuna are now very much back in the fight to avoid relegation after Granada leapfrogged them with a 1-0 win over Malaga.
Odion Ighalo's goal midway through the first-half was enough to move Lucas Alcaraz's side up to 15th, four points clear of the bottom three.
Related Real Madrid News