Wojtek Wolski added an empty-net goal with 12.3 seconds left to seal the win.
Martin Brodeur had 25 saves and Rob Niedermayer scored for the Devils.
New Jersey forward Patrik Elias left the game on a stretcher after being checked by Colorado defenseman Ryan Wilson 38 seconds into the second period.
Elias stayed on the ice for about five minutes before he was secured onto the stretcher. He waved to the crowd as he was taken off the ice. There was no update on his condition.
No penalty was called on the hit, but 3:06 later Wilson dropped the gloves with Devils defenseman Mark Fraser.
Later in the period Matt Hendricks and Rod Pelley fought after a faceoff, the third fight in the game.
The Avalanche took a 1-0 lead on Stewart's 15th goal of the season 3:17 into the game. Defenseman Scott Hannan kept the Devils' clearing attempt in at the point and fed Wolski, who sent the puck low to Paul Stastny. Stewart tipped in Stastny's pass across the crease for his fourth goal in the last six games.
Colorado made it 2-0 when Galiardi scored his sixth goal with 1:28 left in the first period.
New Jersey turned up the pressure in the second period, outshooting the Avalanche 14-8. The Devils had great chances to score when they had back-to-back power plays late in the frame, but Anderson came up with big saves to keep the lead 2-0.
The Devils finally solved Anderson 1:55 into the third when Niedermayer redirected Jay Pandolfo's centering pass through the goalie's pads for his sixth goal of the year.
New Jersey got a late power play and pulled Brodeur with 1:10 left to get a two-man advantage but still couldn't beat Anderson, who made five saves in the last two minutes.
NOTES: Colorado placed D Adam Foote (ankle) on the injured list Friday, retroactive to Jan. 8. ... The Avalanche honored Claude Lemieux before the game as part of its season-long salute to alumni. Lemieux played four-plus seasons in Colorado, helping the Avalanche win the 1996 Stanley Cup. ... Avalanche F Marek Svatos returned to the lineup after missing 12 of the last 13 games with a groin injury.