Barzal scored in the fourth round of the shootout after Islanders rookie goaltender Ilya Sorokin denied Flyers captain Claude Giroux's chance to win the game. After Barzal scored, Sorokin then stopped Jakub Voracek to seal the win.
Anthony Beauvillier scored twice to give the Islanders a 2-0 lead entering the third period before Giroux answered with a pair of goals to tie the score.
Sorokin made 30 saves in 65 minutes of play and improved to 9-3-1 on the season and 6-0-0 at home.
''I thought he was really good when they tied it 2-2,'' Islanders coach Barry Trotz said. ''In the shootout he was outstanding.''
The Islanders continued their strong play at Nassau Coliseum, where they are 15-1-2 this season. They are the only team in the league with one regulation loss at home and the Islanders also kept pace with the Washington Capitals in the race for first place in the East Division with 52 points.
''I like the fact that we kept it grounded and knew we'd be in a good fight tonight,'' Trotz added. ''Give them credit, they did a really good job. It was a hard game for both teams.''
The Islanders are 16-4-1 in their last 21 games and 21-6-4 over their last 31 games. The Flyers continued their swoon with a 6-10-2 record since they were 11-4-3 on Feb. 28. The Islanders also improved to 3-1 in shootouts this season.
Beauvillier opened the scoring beating Hart on the power play at 12:01 of the first. Matt Martin and Jordan Eberle assisted.
The 23-year-old forward scored again at 15:40 of the second, converting a pass from Barzal for his eighth goal of the season. Bazral has 21 assists and a team-leading 34 points overall. He has points in four straight games, including a five-point effort in Thursday's 8-4 home win over Washington.
''We didn't have the puck as much as we would have liked, but we were playing good defense,'' Barzal said. ''And (Carter) Hart made a couple of really good saves.''
Giroux ruined Sorokin's shutout bid with an unassisted goal at 6:38 of the third. The Flyers captain scored again at 10:32, his 11th goal of the season, with assists to Voracek and Travis Konecny.
''Where we are at this point of the season, it's disappointing not to get that second point,'' Giroux said. ''In shootouts, anything can happen and we need those extra points. With saying that, today's game was our best in a while and we need to build on this.''
The Flyers outshot the Islanders 10-3 in the opening period and failed to convert on a 5-on-3 advantage for more than a minute late in the period. In the second, the Flyers had a 11-7 shots advantage, but Sorokin continued his stellar play.
The Flyers were trying to rebound from a 6-1 road loss against the last-place Buffalo Sabres. But Philadelphia continued to slip further from the fourth and final playoff spot in the division currently held by the Boston Bruins who are four points ahead of the Flyers with two games in hand.
Flyers netminder Carter Hart made 22 saves, pleasing coach Alain Vigneault. The 22-year-old Hart has struggled in recent weeks and is 8-9-4 this season.
''He played well tonight'' Vigneault said. ''He did what we expect a goaltender to do and that's give your team a chance. He did that.''
All but one of the six games between the Islanders and Flyers this season have been decided by one goal. The Flyers are the only team to beat the Islanders in regulation at Nassau Coliseum, a 4-3 victory on March 18. The Islanders are 3-2-1 against Flyers who return to Nassau Coliseum on April 8 before the teams meet for the last time on April 18 in Philadelphia.
Islanders defenseman Nick Leddy played his 500th game for the franchise, becoming the seventh current Islander to reach that milestone. The 30-year-old Leddy, acquired in a 2014 trade with the Chicago Blackhawks, leads the team with 24 assists.
The Islanders have four players with active consecutive game streaks of at least 200 games: Brock Nelson at 283, Mathew Barzal with 270 and Ryan Pulock at 233. All three players have appeared in every game since Barry Trotz became the team's coach at the start the 2018-19 season. Islanders captain Anders Lee had played 295 straight games before suffering a season-ending knee injury against the New Jersey Devils on March 11.
Islanders: Hosting Washington Capitals on Tuesday.
Flyers: Visiting Boston Bruins on Monday.
More AP NHL: https://apnews.com/hub/NHL and https://twitter.com/AP-Sports
Copyright 2021 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.