Gallagher gave the Canadiens a 3-2 lead midway through the third period as he one-timed Karl Alzner's long and lazy rebound from the slot. Late in the game, Gallagher set up Paul Byron for a key insurance marker.
The Canadiens (18-20-4) earned their second straight win, while the Canucks (16-20-6) have lost four straight games and 12 of the past 14.
It was the second of back-to-back games for the Canucks, who took a 3-2 shootout loss in Toronto on Saturday.
Alzner, Alex Galchenyuk and Max Pacioretty, into an empty net in the final minute, also scored for Montreal. Both Alzner and Gallagher grew up in the Vancouver area and thrived against their hometown team.
Daniel Sedin led the Canucks with a goal and an assist, while Michael Del Zotto also tallied for the visitors.
The Canucks overcame a 2-0 deficit to tied the game in the third period - one night after squandering a 2-0 lead - but could not pull out a win.
Despite being questionable due to the flu, Canadiens goaltender Carey Price posted the win, stopping 34 of 36 shots. Vancouver counterpart Anders Nilsson bore the loss while recording 40 saves on 44 shots.
"I woke up this morning and I wasn't feeling that great, but I got some meds in me and I was able to get through it," Price told Sportsnet.
Alzner opened the scoring 9:39 into the game as he fooled Nilsson with a long shot that appeared to hit Vancouver defenseman Troy Stecher's stick and change direction. The goal came after the Habs launched a quick counter-attack following goaltender Nilsson botching an attempted stretch pass from his crease.
Galchenyuk put Montreal ahead 2-0 on a power play at 2:12 of the second period as he one-timed a pass from Jeff Petry. The goal was the 10th of the season for Galchenyuk, who has picked up his game after being criticized for a lack of production.
Canucks defenseman Derrick Pouliot was off for hooking Paul Byron at the time of the goal.
Just under 11 minutes later, Daniel Sedin put the Canucks on the scoreboard. He deflected in Alex Edler's point shot while teammate Brock Boeser stood behind him and screened Price.
Rushing up into the offense, defenseman Del Zetto pulled the Canucks even at 2:47 of the third period as he converted a two-on-one with Boeser. Daniel Sedin triggered the play, sending a lead pass Boeser as the Canucks caught Montreal on a counter-attack.
Winger Sven Baertschi returned to Vancouver's lineup after being out since Dec. 9 with a broken jaw suffered in a game against Calgary. Canucks defenseman Chris Tanev was sidelined after taking a puck in the face Saturday in Toronto.
After netting the winner, Gallagher fed Byron on a two-on-one that he converted successfully with 1:15 left in the game.
Alzner drew the assist after returning from an assessment in the dressing room under the NHL's concussion protocol.
Earlier Sunday, the Canucks returned forward Reid Boucher to Utica of the American Hockey League.
--Field Level Media
Vancouver | Montreal | |
Daniel Sedin 2 | Points | Karl Alzner 2 |
Daniel Sedin 1 | Goals | Karl Alzner 1 |
Daniel Sedin 1 | Assists | Jeff Petry 2 |
N/A | Power Play Goals | Alex Galchenyuk 1 |
N/A | Short Handed Goals | N/A |
Anders Nilsson .909 | Save Percentage | Carey Price .944 |
Anders Nilsson 40 | Saves | Carey Price 34 |
Team | Shots | Goals | Power Play | Penalty Kill | Penalty Mins | Face Offs Won |
Vancouver | 36 | 2 | 0-3 | 2-3 | 6 | 30 |
Montreal | 45 | 5 | 1-3 | 3-3 | 6 | 31 |