Galchenyuk scored the winner for the Canadiens at 9:34, netting his seventh of the season into a gaping net after an Alexei Emelin shot fortuitously landed on his stick.
The regulation loss was New Jersey's first at the Bell Centre since 2008.
After sustained pressure by the Devils in the Canadiens' zone, Bernier opened the scoring at 11:13 of the first period with his second goal in as many games.
The Quebec City native was left all alone in front of the net and beat Price on his blocker side by deflecting an Anton Volchenkov shot from the point.
The Canadiens levelled the score at 8:49 of the second when Bourque took a no-look, behind-the-back pass from David Desharnais and scored his sixth of the year, short side.
With Dainius Zubrus in the box for interference, Pacioretty broke the deadlock on the power play at 16:49, taking a cross-ice pass from Andrei Markov and firing home from the faceoff circle to Brodeur's left.
Ryder made it 2-2 early in the third period when he rifled a slap shot into the top corner of the net.
The game was the first of a home-and-home series against the Devils. The teams face off again on Wednesday in New Jersey.
Notes: The Canadiens have now taken 13 points from their last 7 games. … The Devils were without Adam Larsson (lower body), Stephen Gionta (ankle) and Ryan Clowe (head). … Ryan White and Francis Bouillon were healthy scratches for Montreal. … Montreal has allowed two goals or fewer in its last 11 games.