Martinez didn’t miss his pitch, sending a hanging slider from Rafael Dolis deep into the Florida night. It was his 12th home run of the season and the 250th of his career.
“I was just trying to go up there and hit it hard,” Martinez said. “It was a big win.”
Martinez, who was released by the Astros in 2014, said he never imagined he’d hit 250 homers.
The first-place Sox (27-18) took two of three from the Blue Jays and have won five of seven overall. It was their 17th comeback victory.
Matt Barnes closed the Jays out for his 10th save in 11 chances. He struck out three, working around a two-out walk with an overpowering fastball as the Sox-centric crowd of 1,562 celebrated.
“What an amazing win. What a great game. What a big-league ‘W,’” manager Alex Cora said.
Dolis inherited a 7-5 lead. Bobby Dalbec and Michael Chavis started the inning with singles. Barnes immediately started throwing in the bullpen, knowing the game could change quickly in the small, wind-blown spring training ballpark where the Jays have been playing their home games.
A wild pitch moved them up and Dalbec scored when Alex Verdugo grounded to first base for the second out. Martinez took a low slider for a strike, then hammered the next to right center.
“Even on nights when he quote unquote struggles, he’s one at-bat away from changing the game,” Cora said.
It was the first Red Sox go-ahead home run in the ninth inning of a road game since Sept. 2, 2018, when Brandon Phillips hit his only home run with the club to beat the Atlanta Braves.
All eight runs by the Sox scored with two outs. Toronto pitchers had retired 10 in a row before the ninth.
Trailing 2-0, the Sox made two quick outs in the top of the second inning. Christian Vázquez was nearly the third, but he fouled off a two-strike pitch before dropping a single into right field. It was the first of seven consecutive hits, as the Sox scored five runs against Steven Matz.
After Vázquez singled, Hunter Renfroe singled to center. Dalbec then launched a curveball to right field that got caught in the wind, but hit the foul pole for a home run.

Chavis kept the inning going with a double to the gap in right. Kiké Hernández singled into left field, the ball deflecting off the glove of shortstop Marcus Semien just enough for Chavis to score. Singles by Verdugo and Martinez drove in Hernández.
Four of the seven hits in the inning came with two strikes.
But the Sox did not score again off Matz, who went six innings and threw only 45 more pitches. And Red Sox starter Nick Pivetta, who has been strong all season, could not hold the 5-2 lead.
Up 5-3, Pivetta walked Semien to start the fifth inning. Vladimir Guerrero Jr. singled with one out, chopping a single into right field against a shift as Semien took third.
Teoscar Hernández followed with a slowly hit ball to third base that popped out of Rafael Devers’ glove for an error and Semien scored. Cavan Biggio then grounded a single to center to drive in Guerrero with the tying run.
With Pivetta at 95 pitches, the Sox tried Hirokazu Sawamura in the sixth inning. He had not pitched in eight days, and it showed.

Danny Jansen ripped a low fastball to the gap in right. Renfroe misplayed the ball and Jansen ended up on third. Jonathan Davis followed with a single to left to give the Jays the lead.
With two outs and runners on first and second, Hernández hit a sharp grounder up the middle that Bogaerts dove to stop and flipped to second. But Chavis dropped the ball for another error, and it proved costly when Randal Grichuk singled to drive in Davis. That gave the Jays a 7-5 lead.
The Sox weren’t sharp on the mound or defensively. But they overcame it.
“It was a huge team win. It was massive,” Pivetta said.
Peter Abraham can be reached at peter.abraham@globe.com. Follow him on Twitter @PeteAbe.
