Trailing 5-4 entering the frame, Toronto battled back with Fred Lewis igniting the rally with a one-out triple off Kevin Slowey. Matt Guerrier (1-5) relieved and surrendered a sacrifice fly to Alex Gonzalez to produce a tie.
Jose Bautista walked and Wells broke an 0-for-21 slump by hitting a smash off the center field wall to score Bautista with the go-ahead run.
Scott Downs (3-5) tossed 1 1/3 innings of scoreless relief to get the win and Kevin Gregg notched his 19th save to preserve Toronto's victory.
Bautista hit his major league-leading 22nd home run and Gonzalez added a solo shot for the Blue Jays.
Orlando Hudson homered and drove in three runs and Delmon Young added a solo shot for the Twins, who fell 1 1/2 games behind Detroit in the American League Central standings.