Nick Suzuki, Juraj Slafkovsky, Brendan Gallagher and Christian Dvorak also scored for the Canadiens (23-19-4), who trailed 4-3 heading into the third period.
Montreal, which has won 12 of its last 16 games, rebounded after blowing a three-goal lead on home ice Saturday night against the Toronto Maple Leafs on their way to an eventual 7-3 loss.
Dobes, making his first home start for the Canadiens, stopped 22 shots as he improved his record to 5-0 to begin his NHL career.
Alexis Lafrenière, Will Cuylle, Mika Zibanejad and Chris Kreider scored for the Rangers (22-21-3), as they saw their two-game winning streak snapped.
Jonathan Quick, who was in search of his 400th career NHL win, made 33 saves for the Rangers.
Canadiens: Montreal fell behind by one goal on four separate occasions, only to respond with a goal of its own each time.
Rangers: Despite the loss, the Rangers ran their unbeaten streak in regulation time to eight games.
Slafkovsky accepted a beautiful feed from linemate Cole Caufield before crashing into the goal, knotting the game at 4-4 at 12:52 of the third, forcing overtime. It was Slafkovsky’s second goal in his last three games after having gone 10 straight games without a goal.
By collecting an assist on Slafkovsky’s goal, Lane Hutson set the Canadiens’ franchise record for longest point streak by a rookie defenceman at eight games. Over the course of the streak, Hutson has one goal and 11 assists.
Rangers: Host the Ottawa Senators on Tuesday.
Canadiens: Host the Tampa Bay Lightning on Tuesday.