Barzal's tally, his 22nd of the season, halted a stretch of three unanswered goals from the Flyers, who trailed 4-1 entering the third. John Tavares (36 goals) scored twice and Anthony Beauvillier (20) each added a goal for the Islanders, who had dropped 16 of their last 19 games.
Nolan Patrick (13) netted a pair of third-period goals and both Wayne Simmonds (24) and Claude Giroux (30) scored for Philadelphia, which would clinch an Eastern Conference playoff berth with three points in its final two games.
The Flyers sit in fifth place in the Metropolitan Division, but they are just two points behind Pittsburgh and Columbus, the teams that are tied for second, and one point behind New Jersey. The division's top three teams earn playoff bids.
Thomas Greiss made 27 saves for New York and Petr Mrazek had 32 for Philadelphia.
A streaking Barzal took a feed from Beauvillier and tucked his backhanded attempt past Mrazek to put the Islanders ahead for good.
The decisive tally came after Giroux brought the Flyers all the way back with his tying goal with 6:58 to play. Patrick sparked the late rally when he scored 4:07 into the final period before making it a one-goal game with 11:44 left.
Barzal capped a three-goal second period for New York with his goal with 3:33 remaining. Beauvillier lit the lamp 3:43 into the second before Tavares netted his second of the evening with 8:54 to go.
With his second goal, Tavares bumped his season point total to a team-high 83.
Tavares opened the scoring with a power-play goal 7:15 into the first. Simmonds pulled the Flyers into a 1-all tie on his goal with 53 seconds left to play in the period.
Philadelphia returns home to face the Carolina Hurricanes on Thursday. The Islanders host the rival New York Rangers in their home finale Thursday.
--Field Level Media
Philadelphia | NY Islanders | |
Nolan Patrick 3 | Points | Mathew Barzal 3 |
Nolan Patrick 2 | Goals | Mathew Barzal 2 |
Shayne Gostisbehere 2 | Assists | Anthony Beauvillier 2 |
Nolan Patrick 2 | Power Play Goals | John Tavares 1 |
N/A | Short Handed Goals | N/A |
Petr Mrazek .865 | Save Percentage | Thomas Greiss .871 |
Petr Mrazek 32 | Saves | Thomas Greiss 27 |
Team | Shots | Goals | Power Play | Penalty Kill | Penalty Mins | Face Offs Won |
Philadelphia | 31 | 4 | 2-2 | 2-3 | 12 | 29 |
NY Islanders | 37 | 5 | 1-3 | 0-2 | 8 | 28 |