The Twins were trailing 3-0 in the eighth when they shaved the deficit to one run on RBI doubles from Eduardo Escobar and Ryan Doumit.
Dozier then tied it with a lead-off solo homer in the ninth off Joaquin Benoit.
The game remain knotted until the 11th when Dozier collected a lead-off single against Luke Putkonen (1-2), went to second on a wild pitch and scored the game-winner on Pinto's solid single to right.
Anthony Swarzak (3-2) earned the win for Minnesota, which ended a four-game losing streak.
Torii Hunter went 3-for-6 with an RBI for American League Central-leading Detroit, whose magic number to win the division crown remained at two.
Teacher apologizes for showing sexual image of herself in class
Scarlett Johansson steps out with fiance after pregnancy reveal