Zach Parise and Josh Bailey each scored twice, and Ilya Sorokin made an NHL career high 43 saves for the Islanders (34-29-9), who have won six of their past eight games and eight of nine at home. They are 15 points behind the Washington Capitals for the second wild card into the playoffs from the Eastern Conference.
"I was very happy with the resolve," New York coach Barry Trotz said. "It was an exciting game. You got a little bit of everything; you got some great plays, you got some great saves, you got some great penalty killing, you got a couple power plays that were going pretty good. You got a shootout. You got a pretty good game right there."
Kyle Palmieri scored the lone shootout goal in the second round. Sorokin made saves against Guentzel and Crosby before the puck rolled off the stick of Kris Letang in the third round.
Guentzel gave Pittsburgh a 1-0 lead at 5:52 of the first period. Crosby shot into the crease, and Rakell passed to Guentzel for a snap shot.
Parise tied it 1-1 on a power play with a wrist shot at 9:10, then gave the Islanders a 2-1 lead with a shorthanded goal at 12:03 set up by a cross-crease pass from Jean-Gabriel Pageau.
"There's always moments throughout a game that aren't going to go your way," Parise said. "We always talk about responding. You talk about responding after getting scored on, you talk about responding after a goal. Those are big moments in a game."
Bailey made it 3-1 at 19:22 with a one-timer on a turnover from Penguins forward Teddy Blueger.
Danton Heinen cut it to 3-2 at 3:46 of the second period, tapping in a pass from Kasperi Kapanen.
"It's a tough loss," Kapanen said. "We handed them a couple easy ones. (We have to) just kind of clean up our game. I feel like we've been making unnecessary mistakes as of late."
Guentzel tied it 3-3 with his 35th goal of the season at 18:32, skating behind the net to the high slot for a wrist shot.
Pittsburgh outshot New York 19-7 in the second.
But Bailey gave the Islanders a 4-3 lead at 2:49 of the third period on a backhand after the puck caromed past Penguins defenseman Brian Dumoulin in the corner.
"We just have to stick with it," Bailey said. "They have a great team over there and they're going to get their chances. You just have to keep pushing."