Adam Pelech scored his first goal of the season, Zach Parise had two assists, and Ilya Sorokin made 30 saves for the Islanders (11-12-6), who had three games postponed because of attendance restrictions in Canada cities along with their game at the Seattle Kraken on Jan. 4.
New York has played just three games in the past 25 days but is 4-0-1 in a five-game point streak.
"We were a little rusty at first, but once we got our legs under us a little bit, I thought we had a little better showing," Parise said.
Jon Gillies made 22 saves for the Devils (14-18-5), who have lost three of four. He was making his first start since Dec. 19 with goalies Mackenzie Blackwood and Akira Schmid in COVID-19 protocol, and Jonathan Bernier (hip) and Nico Daws (undisclosed) injured.
"I thought Jon played really well for us, gave us a real solid game," New Jersey coach Lindy Ruff said. "You look at the first two goals, really nothing you could do about them. The third one ends up being a heck of a shot."
Yegor Sharangovich gave the Devils a 1-0 lead at 9:43 of the first period when his shot from the top of the left face-off circle squeaked past Sorokin short side.
Bailey tied it 1-1 with a rebound on the power play at 18:59. The goal came 30 seconds after Sorokin bailed the Islanders out with a save against Sharangovich, who stole Barzal's outlet pass in the slot.
Sorokin made another key save to keep the game tied when he stopped Andreas Johnsson's redirection with his left pad at 7:38 of the second period.
Pelech, who was selected to play in the 2022 Honda NHL All-Star Game earlier Thursday, then made it 2-1 at 9:22 with a wrist shot from the point that deflected off Ryan Graves.
"[Sorokin] clearly made some really big saves at key moments," Islanders associate Lane Lambert said. "Both our goalies have done that over and over again, but no question, there were two or three of them that were really key."