The Canadiens had forged a 1-1 tie when Brian Gionta scored on a backhander with 28 seconds remaining in regulation.
But the Red Wings salvaged the victory as time was running out in the extra frame.
Todd Bertuzzi also scored for Detroit, which began post-Olympics play with a fourth win in six games.
Peter Budaj, starting in place of Carey Price, finished with 28 saves for Montreal, which had its three-game win streak ended.
Boston schools pull out free condoms over wrapping complaints
Aaron Carter is still in love with Hilary Duff