Bastian cut it to 3-1 at 5:02 when he took a pass from Michael McLeod, got behind the defense and lifted a wrist shot over Andersen's right shoulder.
"We're a confident group, and the first period was not good enough," Bastian said. "To come back and maybe start feeling our game a little bit in the second, obviously it's positive. We have no doubt in this group that we'll come out better next time."
The Devils outshot the Hurricanes 9-6 in the second period, including a point-blank chance from Nico Hischier with 1:04 remaining.
"Every game there's different ebbs and flows in who kind of has control of it," Andersen said. "They'll put some pressure on. There's a lot of good skilled players on that team. I'm glad we were able to regroup for the third (period)."