BOSTON -- The Boston Red Sox didn't want to ruin their day off with another off night before the Yankees come to town.
Coco Crisp put the Red Sox on top with a two-run double in the sixth for Boston, which had dropped the first two games of the series to the Tigers.
Boston's win and a 3-2 victory by the Baltimore Orioles over New York sliced the Yankees' AL East lead to two games.
The Red Sox and Yankees open a five-game series on Friday.
"This is a big relief for us," Red Sox catcher Javy Lopez said. "We're looking forward to Friday."
Ortiz hit a two-run shot off Justin Verlander (14-6) into the Red Sox bullpen in the fifth to give Boston a 3-1 lead. He also leads the majors in RBI with 113.
Magglio Ordonez and Brent Clevlen homered for the Tigers.
Wells (2-2), making his fourth start since coming off the disabled list July 31, gave up four runs on 10 hits with one walk and three strikeouts.
With Boston's starters struggling to make it past six innings the past few weeks, Wells performance was timely.
"He just quieted things down a little bit," Boston manager Terry Francona said. "The magnitude of any game isn't too big for him, and he just goes out and competes and throws what he throws for strikes. When he's healthy enough to do it, he's pretty good."
Craig Hansen got four outs and Jonathan Papelbon worked the ninth for his 32nd save in 37 chances.
Verlander failed in his bid to tie Toronto's Roy Halladay for the major-league lead with 15 wins. The rookie right-hander allowed five runs on six hits in six innings, with a career-high seven walks and two strikeouts.
Verlander had to rely too much on his fastball without having control of his breaking pitches.
"It's not very often that he doesn't have command of either his curve or the changeup," Tigers manager Jim Leyland said. "He just didn't have good feel for either one."
The Tigers had grabbed a 4-3 lead in the top of the sixth, but the Red Sox came back with a pair of runs with two outs in the bottom of the inning.
Mike Lowell walked, Javy Lopez singled and Alex Cora walked to load the bases before Crisp doubled off the Green Monster. Cora was cut down at the plate on a long throw by left fielder Craig Monroe to end the inning.
"Sometimes you don't have it," Verlander said. "I felt like I battled pretty good. I couldn't make that pitch and Crisp hit it off the wall."
Trailing 3-1 in the sixth, the Tigers scored three runs off Wells. Ordonez opened the inning with a homer into the seats above the Green Monster. Two outs later, Clevlen, recalled from Double-A on July 29, hit a two-run shot over the seats above the Monster.
"He's a guy that never gives up even though he gave up a couple of home runs," Lopez said of his batterymate.
Lowell's sacrifice fly off reliever Jason Grilli made it 6-4 in the seventh.
Plate umpire Bruce Froemming worked his 5,000th career game, becoming only the second umpire to reach that milestone. Bill Klem worked 5,374 games from 1905-40. Froemming was honored with a brief on-field ceremony and received a standing ovation before stepping to a microphone, thanking the fans and saying "Play ball."
The Tigers grabbed a 1-0 lead in the third on Monroe's RBI single.
Boston tied it in the bottom of the inning without getting a hit on Mark Loretta's grounder to short.
"We're in a dogfight," said Lowell. "I'd much rather go into the off day with a victory. We played a good game, beat a good team."
- The Red Sox are off Thursday and start the series against the Yankees with a day-night doubleheader on Friday.
- Boston will send RHP Jason Johnson in the opener of a day-night doubleheader.
- Boston CF Crisp made a sliding catch of Inge's second-inning liner.
- Detroit C Ivan Rodriguez had a 10-pitch at-bat before drawing a walk to open the game.
- A member of the Carolina Hurricanes training staff brought the Stanley Cup with him to Fenway Park.