The Coyotes spotted the Red Wings an early 2-0 lead, then reeled off five straight goals to snap a two-game losing streak.
Mike Ribeiro scored the first of his two tallies 5:07 into the final period to forge a 2-2 tie and Hanzal put Phoenix ahead 2 minutes later.
Ribeiro made it 4-2 later in the third and Smith added an empty-netter as the clock expired, becoming the 11th goaltender in NHL history to be credited with a goal -- and just the sixth to score one on his own shot.
He finished with 31 saves after yielding two goals in the first period.
Jimmy Howard made 28 saves for the Red Wings.
Beyonce flaunts bikini body, Blue Ivy in vacation pics
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need