Markov was at the edge of the crease and lifted the rebound of Rene Bourque's shot off the end boards into an open side for his fourth goal. The Canadiens went on the man advantage after Andy Greene took down Erik Cole at 4:01.
"We played against a good hockey team that hadn't lost and that went to the Stanley Cup final last season, so it was a good measuring stick for us," said Montreal coach Michel Therrien. "We showed a lot of resilience."
The Canadiens took a 3-1 lead early in the third period, but David Clarkson scored on a power play and Dainius Zubrus tied the game at 13:02. Patrik Elias scored and had two assists to reach 900 career points.
The Canadiens posted a rare win over veteran goalie Martin Brodeur, who is 43-19-5 against Montreal in his career.
Montreal had a 32-25 shots advantage, including 16-7 in the opening period when they took a 2-0 lead.
The Canadiens were first on the puck from the outset and scored 2:25 into the game when Alexei Emelin's shot was tipped by Travis Moen and went off Brodeur to White for his first of the season.
Emelin flipped the puck to the far blue line where Greene lost it to Alex Galchenyuk, who slipped a pass into the slot for the onrushing Gallagher to fire into an open side at 13:35. It was a first goal in three NHL games for the 20-year-old.
"To get that first one is something you remember," Gallagher said. "Alex made a great pass. He looked off the D-man and put it right where it had to be. I just had to put it on the net."
The roles reversed in the second period as New Jersey camped out in Montreal's end and got a goal at 3:26 when Elias tipped a Mark Fayne point shot past Carey Price after some strong work in the corner by Clarkson.
Galchenyuk intercepted a clearing attempt and slipped the puck ahead to Prust to bat in two minutes into the third period.
"We've got to keep doing the same thing -- keeping it simple out there, moving pucks and hunting down pucks," Prust said. "That's what made us successful."
But Galchenyuk and Prust were both off for high-sticking when Clarkson banged in an Elias feed during a two-man advantage at 5:23.
Zubrus tied it at 13:02 on a feed from behind the net by Elias.
Montreal was without left winger Max Pacioretty, who was released from hospital Sunday after an appendectomy. He will be out 3-4 weeks. Lars Eller moved into his spot. ... . Galchenyuk for Montreal and Stefan Matteau for New Jersey each played a fourth game. They can play one more before their teams must decide whether to send them back to juniors.
Copyright by STATS LLC and The Associated Press
Arena: Bell Centre Location: Montreal, Quebec
Referees: Eric Furlatt, Wes McCauley Linesmen: David Brisebois, Michel Cormier
Attendance: 21,273 (100.0% full)
Team Stat Comparison
Power Play Goals
Power Play Opportunities
Shots on Goal
Ryan White (1)
Assists: Travis Moen, Alexei Emelin
Brendan Gallagher (1)
Assist: Alex Galchenyuk
Patrik Elias (2)
Assists: Mark Fayne, David Clarkson
Brandon Prust (1)
Assist: Alex Galchenyuk
David Clarkson (3)
(Power Play) Assists: Patrik Elias, Ilya Kovalchuk
Dainius Zubrus (1)
Assists: Patrik Elias, David Clarkson
Andrei Markov (4)
(Power Play) Assists: Rene Bourque, David Desharnais