Jeff Carter had put the Kings ahead 2-1 on a power-play goal with 2:15 remaining in the third period.
But the Red Wings evened the score with 26.1 seconds to play on a weird play.
Detroit went on a power play when Dwight King was whistled for closing his hand on the puck with 1:45 left and the Wings pulled goalie Jimmy Howard for a 6-on-4 situation.
Nicklas Kronwall launched a shot that deflected off a Los Angeles defenseman and sailed out of play, hitting the crowd-protection netting behind the glass.
It rebounded back down, bounced off the back of startled goalie Jonathan Quick and into the goal. The score was allowed to stand because none of the officials had seen the puck leave the rink.
In the ensuing shootout, Tatar went first and beat Quick with a forehand for the game-winner.
Henrik Zetterberg provided a goal and an assist, and Howard made 30 saves as Detroit broke a two-game skid.
Mike Richards and Quick made 33 saves for Los Angeles.