Tatar had a goal and two assists for the Devils (40-15-5), who have won five of six and started a three-game road trip.
Vitek Vanecek allowed five goals on 19 shots before being pulled at 1:26 of the third period. Akira Schmid made 12 saves in relief.
"You just go in there and try to make the first save to make yourself feel good, and I got into the game," Schmid said. "I just tried to play my game. Obviously, they're a good team. They're fast and good on offense, so [I] just tried to hang in there and somehow get the win."
MacKinnon scored twice, and Rantanen extended his goal streak to six games for the Avalanche (34-20-5), who had won six straight and seven of eight (7-0-1). Justus Annunen made 22 saves.
"New Jersey will make it real tough on you with their forwards and their skating ability and their swarm on the puck in all zones," Colorado coach Jared Bednar said. "So, if you're ready for that type of pressure and that sort of pack mentality that they play with, you can see that [in the] second period when we broke them down, we had a bunch of really good looks. We have to be harder and heavier early on and more engaged to check the puck back earlier on in the game."