Gagne, Darroll Powe and Ian Laperriere and each had a goal and an assist to help the Flyers win their fourth straight and send the Stars to their eighth straight road loss with a 6-3 win Tuesday.
The Flyers credited the system of new coach Peter Laviolette, who replaced John Stevens as coach on Dec. 4.
"It's an aggressive system and allows players to shoot," Powe said. "That's what we like doing. Skating, getting in on the forecheck, hitting guys. It plays well into my game."
The Flyers are 8-1-1 in their last 10 games.
Scott Hartnell, Kimmo Timonen, and Claude Giroux also scored goals, and Matt Carle had two assists for the Flyers who are 8-1-1 in their last ten games.
Steve Ott scored twice and James Neal added the other goal for the Stars, who last won on the road at San Jose on Dec. 11 in a 3-2 shootout.
"We gave them every opportunity to take over the game and they did," Dallas center Brad Richards said. "We've been self-destructing, shooting ourselves in the foot. No one's trying to do this stuff, but we're doing it."
Philadelphia's Michael Leighton made 27 saves. Leighton has started 10 straight games and has gone 8-0-1.
"It's not going to happen every game but we're playing well offensively and defensively right now," Leighton said.
Hartnell got the Flyers on the board at 6:08 of the first period, scoring on a backhanded flip over Dallas goaltender Marty Turco on a power play.
Neal scored his team-leading 19th goal off a give-and-go with Loui Eriksson 56 seconds into the second period.
The Flyers then struck back with four goals in the next 10:28 to take a 5-1 lead and chase Turco, who stopped only 14 of 19 shots. Alex Auld had eight saves.
Powe started the barrage after taking a pass from behind the net from van Riemsdyk at 2:32. Timonen scored shorthanded at 7:53, Giroux at 12:01 when his shot kicked off the right foot of Dallas defenseman Mark Fistric, and Laperriere 59 seconds later.
"Scoring comes from every line now and that's usually a good sign," Timonen said. "Hopefully we can keep it going."
Gagne scored after taking a cross-ice pass from Danny Briere at 10:55 of the third period. Ott scored from the crease at 12:47 and again at 16:06 on a rebound.
Philadelphia D Danny Syvret sustained an upper body injury early in the first period and did not return. ... Dallas is 0 for 22 on the power play in its last five games. ... The Flyers have scored first in ten straight games.