Luxembourg went into the game full of confidence after winning 1-0 at Ireland and they took a shock lead against the European champions when Portuguese-born Gerson Rodrigues, who scored against Ireland, glanced in a header on the half-hour mark.
Portugal went close to levelling on two occasions before Diogo Jota headed in their equaliser in the second minute of added time at the end of the first half.
Ronaldo, who had been denied a goal in the 2-2 draw against Serbia on Saturday despite the ball clearly crossing the line, put Portugal in charge early in the second half, firing into the far bottom corner after combining with Joao Cancelo.
Ronaldo should have scored again later in the half when the ball landed at his feet following a terrible Luxembourg backpass but Portugal’s all-time top scorer shot straight at Anthony Moris, who saved the striker’s second attempt immediately after with his feet.
Substitute Joao Palhinha put Fernando Santos’s side further ahead in the 80th minute by heading home a Pedro Neto corner, also scoring for the first time for his country, while the visitors’ task got easier when Luxembourg’s Maxime Chanot was sent off for a second booking in the 87th.
The victory lifted Portugal to the top of Group A on seven points after three games, level with Serbia, while Luxembourg are third with three points.