MONTREAL -- Letting a two-goal lead get away didn't deflate the Canadiens.
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.
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.