Haula tied it 1-1 with a short-handed goal at 6:15 of the second period, flipping a backhand past Sorokin after Nelson's attempted pass for Noah Dobson hopped over the blue line.
Palmieri put the Islanders back in front 2-1 at 14:21. He skated around the net with the puck before scoring with a backhand in the left circle.
"It was a long time to have the puck on my backhand, was what I was thinking," Palmieri said. "I wanted Pierre right away. I saw [Nelson] come through the slot, and for some reason it was still on my backhand. [I] found some space and [shot] it."
New York outshot New Jersey 17-8 in the second.
"Our goaltender played pretty well," Haula said. "Second period, they were peppering us. … [Vanecek] held them just one [goal] in the second. He made a lot of good saves."
Tomas Tatar had a goal disallowed for the Devils at 8:51 of the third period when it was ruled he used a distinct kicking motion to put the puck past Sorokin.
"They said it was kicked in," New Jersey coach Lindy Ruff said. I don't believe it [was]. Tomas said he didn't even see it; he was just hitting the brakes going to the goal, so that's a determination the League makes.
"There's nothing I can do. It's no use complaining about it. But I think if you look at some of the goals that they've allowed this year, I think that fits that category."
Palmieri made it 3-1 at 15:25 with a wrist shot after New Jersey forward Ondrej Palat backhanded the puck from the corner into the right circle.