Wells threw just nine pitches in the inning.
"With one out, Boomer gets the next two guys out. That was definitely an inning they could have scored a bunch of runs there," said John Olerud, who contributed an RBI with a sacrifice fly in the home half of the sixth.
"Boomer just did a great job of getting out of that jam."
Damon opened the bottom of the inning with a single to right and stole second. After Edgar Renteria struck out, Yankees starter Chien-Ming Wang intentionally walked David Ortiz, and Manny Ramirez's single to left loaded the bases.
Another walk, this one to Trot Nixon, forced in Damon with the first run. After a Varitek grounder, Giambi elected to try for the force at home. However, his throw bounced in front of Posada, allowing Ortiz to score the second run of the inning.
"The right play was going home," said Yankees manager Joe Torre. "It just looked like his feet got moving, and it looked like they got a little tied up on him.
"He has a chance to throw him out at home if he has a clean release. It just didn't work."
It was just Giambi's seventh error of the season.
"Jason was trying to hurry the throw and it bounced," Posada said. "If we do the things we're supposed to do, [Wang] would have given us a chance to win."
Olerud's sacrifice fly brought in Ramirez, and Bill Mueller ended the inning with a ground out to Giambi.
"That's why we won," Damon said. "We took advantage of a couple of mistakes, saw a lot of pitches. It just worked out great for us. We needed every bit of these runs. No lead is safe with the Yankees. Unfortunately, we could have pushed across a few more runs, but that inning we were able to push across enough."
With the four-run cushion, the Red Sox were able to withstand Derek Jeter's two-run home run in the seventh inning and hold on for the victory.
"We were just trying to hold them down," Red Sox manager Terry Francona said. "Jeter's homer isn't the end of the world. It made it closer, but it didn't cost us the ballgame."