The Red Sox had pushed across a pair of runs in the eighth on a Pedro Ciriaco homer and a Cody Ross RBI single, grabbing a 4-2 lead with closer Alfredo Aceves (2-7) on the mound.
After Denard Span flew out, Ben Revere (3-for-5) singled. Both he and Carroll moved up a base on a wild pitch and Mauer then delivered the decisive blow by pounding a 2-2 pitch into the seats above Fenway Park's "Green Monster" left field wall.
The blast made a winner of Alex Burnett (4-3) and Jared Burton tossed a 1-2-3 bottom of the ninth to pick his fourth save as Minnesota took its third straight win over the Bosox.
Mike Aviles socked a solo homer for Boston.