Claude Giroux and Jakub Voracek each had a goal and two assists, while Wayne Simmonds and Erik Gustafsson also scored for the Flyers (18-21-3), who matched their season high for goals and kept their slim playoff hopes alive.
Max Pacioretty, Brendan Gallagher and Alex Galchenyuk scored for the Canadiens (26-10-5), who were coming off a 5-1 loss in Toronto and now have lost twice by big scores since clinching a playoff spot last Thursday.
The Flyers outshot Montreal 33-28 in a sloppy game that had the 21,273 at the Bell Centre booing the home side.
The first period saw Montreal's Ryan White ejected for a direct hit to defenceman Kent Huskins's head with the Canadiens down 2-0 only 6:11 into the game. The Flyers said Huskins had a concussion and he did not return to the game.
White, likely to face further discipline, launched himself at the veteran Huskins, but missed his body and caught him on the jaw.
Price, pulled from his last start in Toronto after allowing three goals on four shots, had a nightmare start again as he let in two on five shots before settling down as the Flyers outshot Montreal 17-8 in the period.
Simmonds broke down right wing and saw his first shot stopped by price, but the rebound hit rookie defenceman Nathan Beaulieu and went in at 2:45.
Gustafsson's wrist shot from the point found went through several bodies in front and trickled between Price's pads at 5:49.
Consecutive cross-checking calls on the Flyers' Oliver Lauridsen allowed the Canadiens to tie it at Pacioretty tipped in a Tomas Plekanec pass in the slot at 19:02 and Galagher scored from the front of the net 38 seconds into the second frame.
Only 24 seconds later, Josh Gorges overskated a puck behind his net and Claude Giroux pounced to feed Voracek in front and put the Flyers back in the lead. Voracek's 18th goal tied a career high set last season.
Hartnell scored from the slot on a power play at 7:30, but Galchenyuk fought off a check to score at 9:11 before Giroux put one in off Andrei Markov's stick at 10:46 for a 5-3 lead.
Hartnell snapped a shot past Budaj from the top of the left circle 12:45 into the third.
Notes: As at many sports events across North America, a moment of silence was held for victims of the Boston Marathon bombing. . . Montreal rested banged-up forward Brandon Prust and put White back in the lineup.