Ronaldo netted an 87th minute penalty before rounding Hungary goalkeeper Peter Gulacsi to score another in stoppage time.
The goals took the Juventus star’s European Championship goals tally to 11, moving him two ahead of Michel Platini, who scored of his nine goals at the 1984 event.
Ronaldo is playing at his fifth European Championships, becoming the first player ever to score at five tournaments.
Portugal were made to sweat in Budapest by Hungary, who are expected to be the Group F whipping boys, yet almost went ahead on 80 minutes when Szabolcs Schon netted.
However, Schon’s strike was disallowed for offside and moments later the visitors took the lead when Raphael Guerreiro’s strike deflected past Gulacsi.
“The important thing was to win,” Ronaldo said.
“It was a difficult game, against an opponent who defended very well, but we scored three goals, and I am very grateful to the team for helping me to score two goals.”
Elsewhere, world champions France got past Germany 1-0 in Munich, although Les Bleus arguably should have won by more.
Mats Hummels’ 20th minute own goal separated the sides but both Kylian Mbappe and Karim Benzema had second-half goals disallowed.
