Elias' second goal came 1 1/2 minutes into the third period and broke a 3-3 tie. Dainius Zubrus provided an insurance tally midway through the final frame and the Devils improved to 6-1-0 in their last seven games.
Martin Brodeur stopped 23-of-26 shots for New Jersey, which won its seventh straight in Montreal.
The Devils spoiled the NHL coaching debut of Randy Cunneyworth, who took over behind the bench on an interim basis after Martin was fired earlier Saturday.
P.K. Subban, Chris Campoli and Lars Eller each scored in the second period, but it wasn't enough to prevent the last-place Habs from sliding to 13-13-7.
Carey Price made 30 saves for Montreal.