Ortiz and Ramirez hit two of Boston's four homers and drew two of its three bases-loaded walks to lead the Red Sox over the Tigers 8-3 Sunday.
"This was an important series, and the next one is an important series," Red Sox manager Terry Francona said.
Detroit only trailed 5-3 going into the eighth, but three pitchers combined to walk four batters and hit another in a 50-pitch inning.
Jason Grilli failed to retire any of the four batters he faced. He hit Youkilis to load the bases, then walked Ortiz, Ramirez and Trot Nixon before being pulled from the game.
"I failed out there today," he said. "I need to be better than that."
Tigers manager Jim Leyland was ejected for arguing balls and strikes during the walk to Ramirez.
"I'm never going to talk about umpires," he said. "We just didn't throw strikes."
Detroit has lost six of eight, including five of seven in back-to-back series against the Yankees and Boston.
"This was kind of a blah homestand," Brandon Inge said. "We didn't play very well, which is funny to say, because not very well this year was really, really good in past years."
Matt Clement (5-4) allowed three runs and six hits in six innings to get the win. He struck out five, walked two and left with a 2-1 count to Detroit's leadoff hitter in the seventh. The Red Sox said the unusual departure, which was instigated by catcher Jason Varitek, was due to fatigue.
"Tek didn't like what he saw," Francona said. "If that runner had reached base, he was coming out anyway."
Clement felt he probably worked too hard after a pair of poor starts.
"I did a lot more throwing, and I think that's why I tuckered out," he said. "It was a good start, though. All of my pitches were better."
Gonzalez hit a two-run drive off Zach Miner in the second inning to give Boston a 2-0 lead. The Red Sox then loaded the bases with two outs in the third before Miner (0-1) induced J.T. Snow to line out to left to end the inning.
The Tigers cut it to 2-1 on Ivan Rodriguez's RBI single in the fourth, but the Red Sox added two more in the fifth inning.
Youkilis led off with his second homer in three games to make it 3-1 and chase Miner from the mound. Jamie Walker relieved and allowed Ortiz's 436-foot drive to right-center field.
Miner allowed three runs and seven hits with two walks in four-plus innings in his major league debut.
"I felt great, but I was just out of whack mechanically," he said. "That's probably the best-hitting team in baseball, and they just wouldn't swing at anything out of the strike zone."
Rodriguez had an RBI groundout and Marcus Thames doubled in a run in the sixth to get Detroit within one again but Ramirez made it 5-3 with a two-out homer off Roman Colon in the seventh.
Magglio Ordonez nearly made it 8-5 in the bottom of the eighth, but Coco Crisp made a leaping catch at the center-field wall to take away a two-run homer.
- Leyland's ejection was his first of the season.
- Youkilis stayed in the game after being hit in the eighth inning, but was replaced by Mike Lowell in the bottom of the inning. He had precautionary X-rays on his forearm, but they were negative and he said that he expects to play Monday in New York.
- Boston improved to 3-3 on its 10-game road trip that ends with four games at Yankee Stadium.
- The Tigers optioned reliever Chris Spurling to Triple-A Toledo after the game, and are expected to recall a position player in time for Tuesday's series opener in Chicago.