ANAHEIM -- Kevin Hayes scored on a breakaway with 1:07 left in overtime to give the Philadelphia Flyers a 2-1 win against the Anaheim Ducks at Honda Center on Sunday.
Sean Couturier scored, Jakub Voracek had two assists, and Brian Elliott made 27 saves for the Flyers (22-12-5).
Philadelphia, coming off a 6-1 loss at the San Jose Sharks on Saturday to open a six-game road trip, improved to 5-1-0 in its past six games.
[WATCH: All Flyers vs. Ducks highlights]
"Less than 24 hours later you have a chance to turn the attitude around," Hayes said. "We came in here before the game and knew this was kind of a must win."
Erik Gudbranson scored, and John Gibson made 33 saves for the Ducks (16-18-5), who were trying to win consecutive games for the first time since a 7-4 win against the Winnipeg Jets on Oct. 29 and a 2-1 overtime win against the Vancouver Canucks on Nov. 1.
"It seems like we take a step forward and a step back constantly," Ducks coach Dallas Eakins said. "That's part of the grind. That's part of the challenge of this league, especially with us transitioning as an organization."
Video: PHI@ANA: Couturier jams rebound past Gibson
Voracek fit a stretch pass past three Anaheim players to Hayes coming across the blue line and he slid the puck between the left post and Gibson's right pad for his 12th goal of the season.
"They came down for a chance, and then I think they changed, so I figured I could cheat a little bit," Hayes said. "Jake [Voracek] made a great pass, and just went backhand forehand, it just went in."
The two assists moved Voracek past Eric Lindros and Rick MacLeish for sixth on the Flyers' all-time list with 370.
Gudbranson gave the Ducks a 1-0 lead 35 seconds into the first period on a slap shot from the right point that got under the right arm of Elliott.
Video: PHI@ANA: Gudbranson opens scoring on long slap shot
Couturier tied it 1-1 at 9:45.
Voracek took a shot from above the right circle. The puck hit Couturier in front of the net and fell in crease. Couturier and Ducks defenseman Josh Manson swiped at it and the puck went through Gibson's pads.
"Just tried to go to the net for a screen," Couturier said. "Jake got it through and it bounced off me. Just jammed it in and it squeaked through his legs."
"We had a good third period," Gibson said. "It seems like we're a little inconsistent. We have a lot of young guys. It's tough to be good every night. We're learning it the hard way."
Philadelphia came in 1-4-0 in its past four road games and 8-10-1 overall.
"We didn't panic," Flyers forward Claude Giroux said. "We knew we could play better. We haven't been great on the road so a win tonight feels good. ... Everyone's buying in and that's the reason why we won tonight."
Video: Hayes ends it in overtime for Philadelphia
They said it
"We started off by giving up that early goal and just kept playing. Really liked our compete level, liked our battle level in the one-on-ones. Thought the second period we should've had a couple goal leads there, but give credit to their goaltender, he played an outstanding game." -- Flyers coach Alain Vigneault
"When you take the two points home, remember that feeling. Remember how that game went. Remember the small things that happened in that game, build off those and bring it the next day. We have to find a way to do that. We did some good things today, but there were some holes in our game that prevented us from winning." -- Ducks defenseman Erik Gudbranson
Need to know
The Flyers are 21-0-3 when leading or tied at the end of two periods. ... Couturier has seven points (two goals, five assists) in his past seven games and eight goals in his past seven games against Anaheim. ... Voracek has seven points (two goals, five assists) in the past six games. ... Giroux won 16-of-22 face-offs (72.7 percent). ... The Ducks went 0-for-4 on the power play. They came in 8-for-28 (28.6 percent) in the previous eight games after going 8-for-76 (10.5 percent) in the first 30 games. ... The Ducks got at least a point in back-to-back games for the first time since a 3-0 win against the New York Islanders on Nov. 25, and a 4-3 shootout loss to the Arizona Coyotes on Nov. 27.
Flyers: At the Los Angeles Kings on Tuesday (9 p.m. ET; FS-W, NBCSP, NHL.TV)
Ducks: At the Vegas Golden Knights on Tuesday (3 p.m. ET; SN1, SN (JIP), ATTSN-RM, FS-W, NHL.TV)
Video: Hayes scores OT winner for Flyers vs. Ducks