Ronaldo double hands Real top spot
The Portugal forward fired a superb free kick in the fifth minute and benefited from a defensive blunder to score his team's third with 10 minutes left on a cold, windy night at the Stade Velodrome.
Lucho Gonzalez, who missed a second-half penalty, had levelled in the 11th minute, only for Raul Albiol to give Real the edge on the hour.
Real, who have 13 points from six matches, will be joined in the next phase by AC Milan, who drew 1-1 at FC Zurich in the other Group C match, while Marseille will play in the Europa League last 32.
"It was a tough game but we knew what to expect. We perfectly dealt with this game to qualify. We were solid, we controlled the game," Real coach Manuel Pellegrini told reporters.
Marseille coach Didier Deschamps was left to ponder what might have been if Lucho had scored the penalty.
"There were still 20 minutes left, maybe it would have been different if we had scored that penalty. But let's be realistic, there is still a big difference between Marseille and Real Madrid," he told reporters
Real got off to a dream start when Ronaldo opened the scoring with a superb 30-metre free kick that went into Steve Mandanda's top right corner in the fifth minute.
The home side, however, hit back six minutes later through Lucho.
A Brandao header was blocked by Raul Albiol on the line but his clearance went straight to the Argentine midfielder, who fired home from the penalty spot.
Real went close to doubling the tally shortly before the hour but Ronaldo's header smashed the far post and Mandanda stopped Gonzalo Higuain's attempt from the rebound in impressive fashion.
Mandanda pulled off another superb save 13 minutes into the second half when he tipped Marcelo's powerful shot over his bar. But he was helpless when Albiol coolly slotted home from a weak clearance by the Marseille defence.
Lucho hit the bar in the 69th minute with his penalty kick after Mamadou Niang was brought down in the box by Iker Casillas. Niang was then replaced by Mathieu Valbuena after picking up a shoulder injury in the process.
Deschamps said German referee Wolfgang Stark could have shown a straight red card to Casillas as Niang will be out for several weeks.
"There could have been a red card. But let's not forget who we were facing, Real Madrid are an institution and in doubt, these decisions go their way," he said.
"But what bothers me most is that I will miss Mamadou for long weeks."
Ronaldo put the result beyond doubt in the 80th minute when he pinched the ball from Mandanda, who had gone out of his box for no reason, losing balance but somehow managing to stay on his feet before netting into the empty goal.