Jose Bautista and Juan Francisco hit solo home runs for the Blue Jays, who have lost a season-high four straight games.
The Red Sox had a 7-3 lead going into the bottom of the eighth, but Toronto scored twice and had the bases loaded with two out before Koji Uehara got the final out of the inning. Then Bautista led off the bottom of the ninth with his homer, cutting Boston's lead to 7-6, and the Blue Jays had the tying run at second and the winning run at first when Uehara got Edwin Encarnacion to line out to Jackie Bradley Jr. in center field, ending the game.
Middlebrooks has 5 home runs and 10 extra base hits in 13 career games at Toronto's Rogers Centre. He had a three-homer game against the Blue Jays on April 7, 2013.
Clay Buchholz survived a shaky first inning to win for the first time in five starts this season. Buchholz (1-2) allowed three runs and six hits in seven innings, bouncing back from a shaky start against Baltimore last Monday in which he allowed six runs in 2 1/3 innings.