Ronaldo worked his magic in the opening stages to win and convert a penalty to give Portugal the lead before Diego Costa cancelled out his effort in the 24th minute.
However, the European Champions would find themselves back in front just before half-time thanks to a calamitous error by De Gea.
Ronaldo was picked out in the dee before drilling a left-footed shot at the Spanish goalkeeper.
It looked a routine save but the Manchester United shotstopper allowed the ball to slither through his fingers and into the back of the net.
The goal means Portugal go into the break with the advantage, while new coach Fernando Hierro has to rejuvenate his players ready for the second half.