With time winding down in the second period, Carcillo flipped a backhand pass that Gagne deposited into the top left corner of the net.
The goal, and another by Danny Briere 1:16 later, was the difference in the Flyers' 3-1 victory over the Toronto Maple Leafs on Sunday night.
"It's tough to give a player like that a bad pass," Carcillo said. "He's been good all year and has been getting hot of late. He's a world-class player and it showed."
Michael Leighton also helped the Flyers to the win, making 27 saves.
In the 1:16 between Gagne's and Briere's goals, Carcillo appeared to score another goal for Philadelphia, but was ruled offside. Briere's insurance goal came with 1:35 left in the period, when he stopped Braydon Coburn's pass with his skate and fired a shot past a diving Jean-Sebastien Giguere.
Jeff Carter scored his 30th goal to help the Flyers break a two-game losing streak in their first home game after the Olympic break.
Carter gave the Flyers a 1-0 lead in the first period on a power-play goal, flipping a shot past Giguere's glove side. The Maple Leafs tied it later in the period on Nikolai Kulemin
The victory helped the Flyers solidify their hold on sixth place in the Eastern Conference, where they sit with 72 points. They are 6-1-1 in their previous eight games, outscoring opponents, 31-21.
"They're all important now," Gagne said. "Every game is a must win, with (the sixth through ninth-place teams so close together). We need to keep winning, and stay in control."
The Maple Leafs had 10 penalty minutes in the first period, and 33 minutes total. On the second of two 5-on-3 chances -- caused by Dion Phaneuf
's high-sticking penalty -- Carter scored into a wide-open net off Chris Pronger's feed.
"When you take penalties it's always tough, you go down to 5-on-3, and they have the No. 3 power play in the league," said Leafs left-winger Luca Caputi. "If you give them so many opportunities eventually it's going to bite you in the rear. I feel like we were just looking for a better effort all around."
Leighton kept the Flyers ahead with big saves, including stopping a shot from Kulemin from close range and another from Tomas Kaberle from the left boards.
Gagne, who missed time earlier in the season with an abdominal injury, has scored four goals in the past four games.
"He's a natural goal scorer, that was a big goal he scored for us," Flyers coach Peter Laviolette said. "Simon has a role on this team, it's to put the puck in the back of the net, play some good two-way hockey, and bury some goals. If you're going to be successful as a team, it's a team sport, everybody has roles and everybody has a job. When you get everyone playing up to their potential, then you can become a very good team."
Carter scored a career-high 46 goals in 2008-09. ... The Flyers have won four straight home games and 10 of their last 12. ... Philadelphia has outscored Toronto 21-9 in winning the four home games against the Maple Leafs.