It was not all good news for Gallagher, though, as the rookie was forced to exit the game in the third with an upper-body injury after Luke Schenn checked him into the boards.
David Desharnais and Tomas Plekanec also scored to for the Canadiens - who have been red hot since losing 6-0 to the Toronto Maple Leafs a week ago - while Daniel Briere tallied for the Flyers.
Ben Scrivens earned his first NHL shutout as Toronto beat the Ottawa Senators 3-0.
Frazer McLaren, Tyler Bozak and John-Michael Liles scored for Toronto, while Scrivens, playing in place of the injured James Reimer, made 34 saves.
John Tavares had three goals an an assist as the New York Islanders saw off the New Jerset Devils 5-1.
The Islanders' other goals came from Michael Grabner and Matt Moulson, who also provided three assists.
Benoit Pouliot scored his second goal in overtime to lift the Tampa Bay Lightning to a 6-5 win over the Florida Panthers.
Steven Stamkos also scored twice for Tampa, while Teddy Purcell netted 11 seconds from the end of regulation to send the game into OT.
Martin Hanzal had two goals and an assist as the Phoenix Coyotes beat the Columbus Blue Jackets 5-3, while the Anaheim Ducks stretched their winning streak to four by beating the Nashville Predators 3-2 via a shootout and the Edmonton Oilers saw off the Colorado Avalanche 6-4.