The Oilers had owned a 1-0 lead since the early stages of the contest and it appeared Devan Dubnyk was going to come away with a shutout. Lidstrom, however, fired a slap shot past Dubnyk to keep Detroit's hopes alive and Datsyuk came through with the game-winner with 42 seconds left in the extra period.
The Red Wings halted a four-game losing streak, their longest of the season. It was their first win of the month.
Jimmy Howard made 26 saves and was perfect after giving up a goal to Ryan Jones 6:40 into the opening period.
Dubnyk took the hard-luck loss, making 42 saves. Edmonton, the last-place team in the Western Conference, is 1-2-1 on a five-game road trip.