TORONTO -- David Ortiz wasn't in the original starting lineup. He made the most of his late addition.
"We've got to try to win some games," Ortiz said. "We're against the ropes. It's all about winning games right now. That's it."
Papelbon pitched around a leadoff single and a two-out walk in the ninth to earn his 29th save in 32 chances.
"There's something to be said for persistence," Red Sox manager Terry Francona said. "That was a very loseable game and it would have been heartbreaking. Because of the way the guys played, we ended up with a very difficult win."
Pressed into action when catcher Jason Varitek was scratched because of muscle spasms in his neck, Ortiz went 2-for-3 with two walks and three RBI.
"It's nice to see," Francona said. "It shows you what I know. I didn't even have him in there to begin with."
Getting the late call didn't disrupt Ortiz's rhythm.
"You've got to mentally be ready for anything," he said.
With the score tied 7-all, Ortiz walked to begin the eighth and took second on Nick Green's single. Alex Gonzalez bunted back to the mound but Casey Janssen (2-4) bobbled the ball, then threw wildly to first, allowing Ortiz to score.
Batting seventh for the second time in four games, Ortiz homered to center on the first pitch of the fourth, his 18th.
"He had a huge game for us," Bay said of Ortiz. "It's one of those things where, if you get him hot at the right time it kind of helps everybody out."
Bay matched Ortiz one inning later, drilling the first pitch of the fifth off the facing of the second deck in right-center, his 26th and sixth in 10 games.
"I didn't have much and they knew it," Beckett said. "They were attacking me."
Beckett allowed seven runs and nine hits in 5 1/3 innings. He walked one and struck out four.
Blue Jays rookie left-hander Ricky Romero didn't figure in the decision despite allowing a career-high six runs, five earned, and eight hits in 3 2/3 innings, the shortest of his young career. Romero, who walked three and struck out two, is 0-2 with a 10.50 ERA in three career starts against Boston.
"The whole offense did a good job getting us back in the game," Romero said. "It's just unfortunate that we didn't do a good job on the mound today."
The Red Sox jumped on Romero with a four-run second. Ortiz hit a two-run double, Alex Gonzalez had an RBI grounder and Ellsbury capped it with an RBI single.
Ruiz's homer, his third, and Edwin Encarnacion's sacrifice fly cut it to 4-2, but Ortiz's blast and another Ellsbury sacrifice fly gave Boston a 6-2 lead.
Snider and Bay traded homers, making it 7-3, but Toronto cut it to 7-5 on Lind's two-run single in the fifth, then tied it on Barajas' homer in the sixth.
Boston's Kevin Youkilis returned to the lineup after serving a five-game suspension for charging the mound and throwing his helmet at Detroit right-hander Rick Porcello on Aug. 11. Outfielder J.D. Drew also started for Boston after missing two games with a sore groin.
- Boston RHP Tim Wakefield (back) threw a bullpen before the game and is still not ready to come off the DL.
- Red Sox 2B Dustin Pedroia returned to Boston Tuesday afternoon to be with his wife as she gave birth to the couple's first child, Dylan.
- Boston pitching coach John Farrell also left the team Tuesday and returned home to Cleveland for a personal matter. Bullpen coach Gary Tuck replaced Farrell.
- OF Rocco Baldelli (ankle) went 0 for 3 with a strikeout in his first rehab game at Triple-A Pawtucket.
- Mike Lowell played his 1500th career game.