Ehlers skated in after Pierre-Luc Dubois tipped him the puck in the Winnipeg zone before beating Canadiens goaltender Carey Price between the legs to give the Jets the win.
The goal was his 15th goal of the season.
Just moments earlier, Connor Hellebuyck saved the game for the Jets, stopping Jeff Petry with a spectacular save before Ehlers counted the game winning tally seconds later.
Kyle Connor had a pair of goals and Pierre-Luc Dubois had three assists to pace the Jets offence.
Connor finished the two-game set with four goals.
Winnipeg, who lost 4-2 to the Canadiens two nights ago remain undefeated following a loss this regular season with an 8-0-1 mark.
Blake Wheeler also scored for the Jets.
Connor Hellebuyck made 33 saves for the Jets (18-9-2), who moved to within two points of the North Division leading Toronto Maple Leafs who were idle.
The game marked the end of a brief two-game homestand for the Jets, who now embark on a seven game Western Canadian road trip which will see them visit Edmonton, Vancouver and Calgary.
Phillip Danault and Brendan Gallagher each had a goal and assist for Montreal, who dropped to 13-8-6.
Tyler Toffoli also scored for the Canadiens.
Carey Price turned aside 26 shots for Montreal.
Jets captain Blake Wheeler got Winnipeg on the board 50 seconds into the contest, after Paul Stastny found Derek Forbort at the top of the faceoff circle before the Jet defenceman hit Wheeler in the high slot.
Wheeler cruised in and beat Montreal goaltender Carey Price with a low shot just inside the left post.
The goal was his 8th of the season.
Kyle Connor made it 2-0 late in the first after he picked up a loose puck along the Montreal goal line after a Nikolaj Ehlers shot went off Pierre-Luc Dubois' skate.
Connor calmly skated in and deposited a backhand shot into the net to score his 15th of the season and third goal in his last two games.
Phillip Danault got the Canadiens on the board 1:24 into the second period when he took a backhand pass from Brendan Gallagher at centre ice before breaking into the Winnipeg end and snapping a wrister past Connor Hellebuyck, beating him high blocker side to make it 2-1.
Kyle Connor scored his 2nd of the night when he picked up a rebound off of a Pierre-Luc Dubois shot from the high slot to restore Winnipeg's two-goal cushion.
The goal was his 16th of the season.
Brendan Gallagher scored to pull the Canadiens within a goal just shy of the six minute mark when he picked up a loose puck off a faceoff which slid between Adam Lowry's legs before moving in and sliding the disc through Hellebuyck's pads to make it 3-2.
The goal was his 11th of the season.
Tyler Toffoli tied it with 1:25 remaining in regulation to send the game to overtime.
The goal was his 18th of the season.
Montreal returns home to kick off a six-game homestand Friday as they host Vancouver while Winnipeg travels to Edmonton to face the Oilers Thursday.
SHOTS-MONTREAL 36 WINNIPEG 30