Real fly out to Japan on Sunday aiming to be crowned the world's best team for a fifth time on the back of a club record 35-game unbeaten run in all competitions.
However, a much-changed Real side had to rely on Ramos to bail them out late on once more on Saturday.
Just a week after netting a last minute equaliser against Barcelona, Ramos powered home the winner as Real overcame a 2-1 deficit in the final six minutes.
"In the end we won the game and that is the way we go into a competition like the Club World Cup," said the Spanish international.
Real coach Zinedine Zidane left Cristiano Ronaldo, Karim Benzema and Luka Modric out of his squad completely as he rested the majority of his first-choice XI.
That decision nearly backfired as Joselu struck twice in two minutes for Deportivo just after the hour mark to cancel out Alvaro Morata's opener.
"It wasn't a great performance. We made mistakes which were costly, but at the end we managed to turn it around," added Ramos.
However, Zidane claimed those that came into the side had done themselves proud as substitute Mariano Diaz took advantage of a rare first-team chance to head home Lucas Vazquez's cross and set up a grandstand finish.
"I am happy for all the players because they played great," said Zidane.
"The game became complicated when we made a mistake for the first goal.
"You have to congratulate the opponents, they played very well and made it very difficult for us.
"But, in the end, we got the three points at that is the most important thing."
The late fightback ensured Zidane's men have now surpassed Real's previous record mark of 34 games unbeaten from the 1988/89 season under Dutch coach Leo Beenhakker.
And the Frenchman hailed his side's mental strength, led by the inspirational captaincy of Ramos.
"Mentally it helps to have gone 35 games unbeaten. It gives you strength," added Zidane.
"Sergio is special because it is not the first time. He is our captain and with many others he is the soul of this team."
However, Deportivo coach Gaizka Garitano raged that Real had been the beneficiaries of favourable refereeing.
"They have a lot of potential, but when you see five minutes added on in a game when there has been no time lost, we knew it would be played until they score," said Garitano.