The Islanders went 1-1-1 on a three-game homestand and will plays six of their next seven on the road, including a four-game trip that begins Monday.
"It's huge," Barzal said. "I think if we had lost tonight, it would have been really upsetting going into this tough road trip. For us to kind of get a big win tonight, it really helps."
Vanek had a goal and two assists, and Jonathan Bernier made 45 saves for Detroit (14-15-5), which has lost four of its past five.
"He's played in hard games, for sure," Red Wings coach Jeff Blashill said of Bernier, who is 4-8-1 this season. "I think his play is way better than his numbers, and I think he's been around long enough to know not to worry about the numbers, just to worry about his play. If he keeps playing like this, I think it finds its way to even out over the course of a season. He's played very good, gave us a chance to win the hockey game tonight, gave us a chance to get a point."