Ronaldo walked off the pitch in the 52nd with a suspected hamstring injury before Karim Benzema, Gareth Bale, Isco Alarcon and Alvaro Morata added goals.
"It was for precaution," Ronaldo said. "It's nothing special. I was kicked in the first half and had the muscle a little stiff."
Madrid coach Carlo Ancelotti said Ronaldo had "a problem with his hamstring" and he would undergo more tests on Sunday.
Andres Iniesta and Cesc Fabregas earned and converted penalties to help injury-battered Barcelona overcome the absence of Messi and four more first-choice players.
"Those of us who are left have to take care of ourselves," Iniesta said. "When we reach April or May it will be a question of having everyone doing their part."
Ronaldo and Messi are their teams' undisputed leaders and the two top scorers in the sport, but their teammates showed they have more than enough attacking talent to get by without them, especially against the lesser league sides, by combining for eight goals without the scoring aces.
Ronaldo is vying to end Messi's unprecedented run of four straight Ballon d'Or awards. While Messi won't be back from a left hamstring tear until January, Ronaldo, if fit, will have one more chance to impress voters on Wednesday when Madrid hosts Galatasaray in the Champions League before voting for the 2013 award closes on Friday.
Ronaldo had already directed two shots on target when he ran forward to toe Isco's bouncing cross inside the far post with his outstretched left boot for his league-leading 17th goal in 14 rounds.
The goal tied Ronaldo with former striker Hugo Sanchez as the Madrid's fourth all-time leading scorer in league play with 164 goals. Ronaldo did it in 149 games, while Sanchez needed 207. Raul Gonzalez holds the record with 228 goals.
With Almeria showing some fight, Ronaldo left the match and went straight to the changing room.
Benzema curled in a pass from Ronaldo's replacement, Jese Rodriguez, in the 61st, Bale pounced on a defensive gaffe to seal the result in the 72nd, and Isco placed a long-range strike inside the post in the 75th. Morata chipped the goalkeeper six minutes later.
Messi paraded his record third Golden Boot for most goals in Europe's domestic leagues last season before taking his seat at Camp Nou.