Trevor Plouffe led off the 15th with a single off Tim Dillard (0-2) and one out later went to second on Brian Dozier's hit. But he was caught in a run-down after rounding third base when Jamey Carroll delivered his fourth hit of the game.
Dozier alertly went to third on the play and came home with the winning run when Span grounded a single to right field off Juan Perez. Span ended the day 4-for-8.
The Twins got to extra innings with a three-run seventh against Brewers starter Zack Greinke.
The rally in a marathon that included a 42-minute rain delay between the 11th and 12th innings, handed a victory to Anthony Swarzak (1-4), who led a Minnesota bullpen that produced nine shutout innings after starter Nick Blackburn gave up four runs in a six-inning effort.
Joe Mauer went 3-for-4 with two RBI singles before leaving the game with a bruised right quadricep sustained in a collision at home plate.