Pierre-Edouard Bellemare and Ian Cole each had a goal and an assist for the Avalanche (25-13-4), who have won two straight. Philipp Grubauer made 28 saves.
"I've had some offensive struggles, but I got the bounces today," Rantanen said. "You just have to keep grinding to get your chances. You know it's going to come at some point and tonight was the night. But it was a great team effort, everyone was playing well."
WATCH: [All Avalanche vs. Devils highlights]
Mackenzie Blackwood made 29 saves for the Devils (15-20-6), who had their three-game winning streak end.
"We weren't able to sustain any offense and their game feeds off that speed and transition," New Jersey forward Kyle Palmieri said. "We didn't establish any offensive-zone time, and they are a very good rush team. When you feed their rush, that's how they get confidence and start feeling good about themselves."
Rantanen, who has four goals in his past two games after not scoring in three straight, was moved to the top line with Nathan Mackinnon and Gabriel Landeskog from the third line early in the second period.
"I thought the MacKinnon line was just average in the first, so we flipped the lines and put Rantanen with them and they scored a couple goals in that period right away," Avalanche coach Jared Bednar said. "I thought Mikko was a driving force to our offense tonight for sure."
Rantanen gave the Avalanche a 1-0 lead on a snap shot from the right face-off circle at 11:23 of the second period. He scored his second off a snap shot from the slot eight seconds into the third period for a 3-0 lead and completed his three-goal night into an empty net at 19:44. His first hat trick was Feb. 7, 2017, against the Montreal Canadiens.
"It was a tough matchup and they had some juice in the third, but we finished the game hard and played good defense and [Grubauer] was good in net," Rantanen said. "When we're at our best, we play fast and support each other. We have guys coming close to each other, and on the forecheck we're heavy and hard, and when there's a loose puck we win those battles like we did these last two games. ... That's when we're winning games."
Cole made it 2-0 on a slap shot from the right point at 15:34 of the second period.