The Devils took a 3-2 lead in the Eastern Conference championship series and will earn a chance to play for the NHL title if they defeat the Rangers Friday in Newark.
New Jersey stormed to a 3-0 lead during the first half of the first period, but the Rangers battled back against goaltender Martin Brodeur and tied it 17 seconds into the third on a slap shot by Marian Gaborik.
Brodeur and New York's Henrik Lundqvist then engaged in a tense goaltending battle until Carter scored his third goal of the playoffs.
Zach Parise added an empty-net goal with 32 seconds remaining in regulation.
Lundqvist gave up four goals on just 16 shots while Brodeur made 25 saves.
Brandon Prust began the New York comeback with a backhander with 4:19 to go in the opening period and Ryan Callahan tallied early in the second by tipping in a shot.
Brodeur recorded the 110th playoff victory of his career.
The winner of this series will take on the Los Angeles Kings for the Stanley Cup. The Kings have lost only twice in the playoffs and have reached the finals as the No. 8 seed in the Western Conference.
Celebrity Breakups and divorces of 2014 [PHOTOS]