The Red Sox earned their first win following three straight losses to start the year despite trailing much of the game.
They were behind 2-1 to start the ninth when Dustin Pedroia began the rally with lead-off double off Sergio Santos (0-1).
He advanced to third on a passed ball and scored the equalizer on Adrian Gonzalez's sacrifice fly. One out later, Santos issued walks to David Ortiz and Cody Ross and Sweeney then followed with his run-scoring hit.
Ross later scored on a wild pitch to complete Boston's rally, which made a winner of Scott Atchison (1-0), who tossed three innings of shutout ball in relief of starter Felix Doubront.
Alfredo Aceves collected his first save with a 1-2-3 ninth.
Blue Jays starter Henderson Alvarez pitched well, yielding one run on four hits over six frames.
Toronto fell to 2-2.