The Devils won for the fifth time in six games but still seem an unlikely prospect to make the playoffs despite moving within eight points of the eighth and final Eastern Conference spot.
Zajac scored with the man advantage in the second period to forge a 1-1 tie. Dustin Byfuglien put Atlanta back in front 4:52 into the third but Ilya Kovalchuk delivered his 25th goal of the season 3 minutes later to force overtime.
Martin Brodeur made 24 saves to get the win.
The Devils killed off an Atlanta power play in overtime before Zajac produced his goal while Evander Kane was in the penalty box for tripping.
Ondrej Pavelec stopped 27 shots and was charged with the loss.