Van Riemsdyk gave Philadelphia a 1-0 lead at 7:43, scoring on his own rebound near the right post, and Provorov made it 2-0 at 14:29 with a wrist shot short side from the left circle.
Hoffman cut it to 2-1 at 15:31, shooting into an open net after Gallagher swiped him the puck with his glove during a scramble in the crease. It was his first goal in 22 games.
"Obviously, I knew what I did. We got away with one," Gallagher said. "It's just one of those things. The refs didn't see it, they can't review it, so we caught a break. … But obviously, after that they took over the game."
Although Jake Evans tied it 2-2 at 5:28 of the second period, the Flyers responded with four straight goals to end their losing streak.
"I think the big thing for us is that we didn't let [Hoffman's goal] derail us," Philadelphia coach Mike Yeo said. "We've been trying to talk about that a lot, you know, how you deal with adversity, whether it's game to game or in the course of a game, and I thought that our guys did a good job of that tonight."
NOTES: Hogberg was plus-1 with three blocked shots in 17:25 after being recalled from Lehigh Valley of the American Hockey League on an emergency basis on Wednesday. He is the ninth player to make his NHL debut for the Flyers this season, joining Brink, Cates, Attard, Max Willman, Linus Sandin, Felix Sandstrom, Isaac Ratcliffe and Hayden Hodgson. … Canadiens forward Michael Pezzetta served the second of his two-game suspension for a cross-check to the head of T.J. Oshie of the Washington Capitals on Saturday.