The Juventus forward scored from the spot in each half to ensure the current holders remain in the competition following a thrilling night of Group F action.
It was Ronaldo’s old club-colleague at Real Madrid, Karim Benzema, who had put Portugal on the verge of exiting the tournament before referee Antonio Mateu Lahoz awarded another penalty in Budapest.
With Germany only able to draw with Hungary in Munich, France were able to top the ‘group of death’ with a tally of five points following a back and forth encounter at the Puskas Arena.
Next up for the world champions is Switzerland while Portugal will travel to Seville to take on Belgium in a mouth-watering last-16 clash.
After two early efforts from Ronaldo were sandwiched between Kylian Mbappe being denied by Rui Patricio, Fernando Santos’ side were given the chance to take the lead in the 27th minute.
France captain Hugo Lloris was penalised for catching Danilo Pereira with a punch from a cross and after the defender was able to leave the pitch on his feet, it was over to the Portugal captain.
Ronaldo made no mistake, smashing home his 108th international goal to briefly put the European Championship holders top of Group F in the repeat of the 2016 final.
It was shortlived with Paul Pogba central to France winning their own spot-kick on the verge of half-time when his pass into Mbappe saw Nelson Semedo drawn into bringing down the Paris St Germain attacker.
Benzema took responsibility and found the net in the second minute of stoppage time for his first international goal in almost six years after he was handed a surprise recall following a lengthy absence ahead of the tournament.
And when Benzema collected another wonderful Pogba pass in the 47th minute and slotted beyond Patricio, Portugal were suddenly heading out with VAR able to overturn the initial decision to rule out the goal for offside.
Ronaldo, as he often does, had the final say with the talisman winning his country a second spot-kick when his cross hit the arm of Jules Kounde.
Ronaldo again sent Lloris the wrong way to tie level with Iran great Daei’s record of 109 international goals.
There was no further drama with Patricio producing a crucial double save with 23 minutes left, firstly tipping Pogba’s 25-yard curler onto the post before he saved Antoine Griezmann’s follow-up effort from inside the area.
After news filtered through that Germany had equalised against Hungary, it meant France and Portugal could slightly breathe easier with both all but confirmed of a place in the knockout stage.
The full-time whistle followed which meant Switzerland awaited France in Bucharest on Monday while Portugal faced Belgium a day earlier.