HOUSTON -- When catcher Ryan Lavarnway tied a major league record with four passed balls in the first inning as he struggled to handle pitches from knuckleballer Steven Wright, it looked as if the Boston Red Sox would be in for a long night.
Lavarnway and the rest of the Red Sox didn't dwell on the tough start and instead focused on how to overcome it.
"We try not to give up until the game is over," Red Sox designated hitter David Ortiz said. "Things got kind of crazy at the beginning, but we kept on playing through it."
Houston extended its lead to 5-0 before Ellsbury's two-run shot in a three-run third closed the gap.
The Astros led 7-3 before a five-run fifth inning, highlighted by a two-run double by Lavarnway that gave Boston a one-run lead.
"It was a key swing in the game," Sox manager John Farrell said of Lavarnway's hit.
The Red Sox tacked on five more runs in the sixth, capped by the pinch-hit homer by Gomes.
The win gives Boston 69 wins this season, which ties its win total from last year's difficult campaign with 47 games to go.
Ortiz had four hits, two RBIs and scored twice for the Red Sox and Shane Victorino added three hits and scored four times.
Wright lasted just one inning in his first major league start. He had never thrown in a domed stadium before and said his ball had more movement that it's ever had. He felt bad that Lavarnway had such a difficult time handling his pitches.
"Usually I can keep it within a certain area of the strike zone," Wright said. "He's caught me before, and he's done a really good job. And today it was all over the place and it makes it tough."
Brandon Workman (2-1) relieved him and got the win despite yielding nine hits and six runs in 4 2/3 innings.
Houston's Jordan Lyles (4-6) gave up nine hits for his third straight start and tied a career high with eight runs in 4 2/3 innings.
"He pitched himself into some predictable fastball counts against a really good fastball-hitting team," manager Bo Porter said of Lyles. "They didn't miss them and they put good swings on them."
Wright won his past two relief appearances and had thrown 9 2/3 scoreless innings entering Tuesday's game. But he had trouble with command from the start and walked leadoff hitter Robbie Grossman.
Grossman stole second before advancing to third on the first passed ball of the inning. He then plunked Brandon Barnes and he later advanced to second on another passed ball.
A third passed ball allowed Grossman to score and Barnes to take second. The last passed ball of the inning sent Barnes home before a single by Jason Castro.
Wright walked Marc Krauss, prompting a visit to the mound by Lavarnway. The visit didn't seem to help, as Wright soon followed it with a wild pitch that left Castro at third.
He scored on a groundout by Wallace before Wright finally escaped the inning by retiring Matt Dominguez.
It was the third time in major league history that a team had four passed balls in one inning. It last happened on Aug. 22, 1987, when Texas Rangers catcher Geno Petralli did it against the White Sox in the seventh inning. Knuckleballer Charlie Hough was pitching in that game.
Workman replaced Wright for the second inning and Jonathan Villar singled with one out before Grossman launched his homer into the seats in right field to extend the lead to 5-0.
Ellsbury's homer got Boston within 5-2 the third inning. Ortiz hit an RBI single later in the inning to make it 5-3.
Wallace matched his home run total from last year when he connected on his ninth of the season to push Houston's lead to 6-3 in the third.
L.J. Hoes hit his first career triple on a long fly ball which bounced up onto Tal's Hill in center field in the fourth. Villar notched the first RBI of his career with a single that sent Hoes home and make it 7-3.
Ellsbury walked to start the fifth before scoring on an error by Hoes after a double by Victorino. Dustin Pedroia's RBI double cut Houston's lead to 7-5 before a single by Ortiz. The Red Sox added a run on a one-out groundout by Mike Carp which sent Ortiz to second.
Ortiz advanced to third on a wild pitch before Lyles walked Stephen Drew.
Lavarnway's double, which sailed out of reach of sprinting left fielder Grossman, scored two to give Boston an 8-7 lead and chase Lyles.
Ellsbury sent his second homer to the second deck in right field off Jose Cisnero to leave Boston up 14-9 in the seventh.
Boston reliever Matt Thornton, who left the game on Sunday in the eighth inning with tightness in his right oblique area, is doing better, but still isn't ready to play. "He feels improved just by going through range-of-motion-type movements," manager Farrell said. "It was a good day for him, but we're still in that time frame where a roster decision might have to be made if we don't see further progression by [Wednesday]." ...Red Sox RHP Clay Buchholz, on the disabled list with neck and shoulder ailments, had a bullpen session on Tuesday where he threw 27 pitches. "He came out of today's session feeling pretty good about himself, and more importantly, he's built up enough of a foundation that we can build a mound progression for him to follow," Farrell said. "Progressive steps are being made right now, which is good."... Sprinter Carl Lewis, a nine-time Olympic gold medalist, threw out the ceremonial first pitch. ... The series wraps up on Wednesday when Boston's Ryan Dempster opposes Jarred Cosart.