Giambi capped a ninth-inning rally with a two-run single and the Yankees avoided an embarrassing three-game sweep with a 5-4 victory over the New York Mets on Sunday night.
Taking advantage of more sloppy defense by their crosstown rivals, the Mets scored three unearned runs in the seventh off Randy Johnson to take a 4-1 lead.
Derek Jeter, who went 1-for-3 with two walks on his 31st birthday, and Alex Rodriguez began the comeback with RBI singles in the bottom half off Aaron Heilman, and the Yankees came through in the ninth against Braden Looper (2-3).
"Thank God. We needed this win big-time," Giambi said.
Tino Martinez, the last non-pitcher on the bench, pinch-hit and walked leading off the ninth.
"You can't walk the leadoff hitter. There's no excuse for that," said Looper, who had converted 14 straight save chances. "We had a one-run lead and we should have won the game. I didn't do my job. I stunk."
Rodriguez doubled just inside the third base line for his fourth hit, and Hideki Matsui was intentionally walked to load the bases. Giambi's single to the gap in right-center gave the Yankees a split of their six games against the Mets this year.
"We didn't panic, I'll tell you that," Giambi said. "That was the nice thing about the Yankees of old, nobody panicked. We just said, 'All right, we need to take some good at-bats,' and we kept fighting and fighting."
Mariano Rivera (4-2) worked a perfect inning for the win, which improved the Yankees to 2-35 when trailing after eight innings.
"If this doesn't built our character, I don't know what will," Yankees manager Joe Torre said. "When we had that ugly inning in the seventh, it's something that certainly would have been tough to try to go to sleep on. And to be able to rescue that, I can't tell you how important it was."
The Yankees headed to Baltimore 6½ games back of AL East-leading Boston and four behind the Orioles.
"Hopefully, this is the turning point of our season, where we can go forward, play consistent baseball all the way around," Gary Sheffield said.
The Mets, who start a six-game homestand against NL rivals Philadelphia and Florida, dropped to 34-2 when leading after eight innings.
"I'm pleased with my guys," said first-year manager Willie Randolph, a former Yankees star player and coach. "I guess it would have been fun to be part of the first [Mets] team to sweep a series at Yankee Stadium."
The Yankees (38-37) completed a topsy-turvy 13-game homestand that began with three-game sweeps of Pittsburgh and the Cubs, followed by five losses in six games against Tampa Bay and the Mets (37-38) -- two opponents owner George Steinbrenner is particularly sensitive about.
Steinbrenner issued a variant of his standard statement of late through spokesman Howard Rubenstein, saying before the game: "It's in Joe Torre's lap. It's up to him."
The Yankees even played the infield in during the third inning, a sign of their urgency. They started with a left fielder, Kevin Reese, who was making his major-league debut, and played the last two innings with a right fielder, Russ Johnson, who had never played the outfield before this year.
Until the rally, the Yankees' defense appeared to doom them to defeat once again on a night that began as a pitcher's duel between Johnson and Kris Benson.
After allowing seven runs in three innings Tuesday against Tampa Bay, Johnson allowed six hits and one earned run in 6 2/3 innings, using a fastball that topped out at 97 mph and a slider that got him most of his five strikeouts.
Jose Reyes' RBI grounder put the Mets ahead in the third, but the Yankees tied it in the sixth after Sheffield reached on third baseman David Wright's 12th error. With the bases loaded and one out, Robinson Cano hit a flare that appeared headed to right field. Marlon Anderson made a diving stop and threw to second for a forceout as Sheffield scored, a play that saved a run.
Johnson walked Ramon Castro, throwing a wild pitch on ball four that sent Woodward to third. Anderson followed with what should have been an inning-ending grounder to second, but Cano booted it for an error as the go-ahead run scored.
Tom Gordon relieved, and Reyes' slow grounder to first left the Yankees resembling a Little League team, chasing the bouncing ball. Giambi's short toss went off Gordon's glove for an error that allowed Castro to score, and Anderson came home, too, as Gordon's throw home bounced away from Posada.
Benson allowed two runs -- one earned -- and three hits in six-plus innings.
Sheffield was tossed by first base umpire CB Bucknor after his seventh-inning grounder bounced off Heilman to Anderson at second. Sheffield appeared on replays to just beat the throw but was called out and then was ejected after throwing his helmet.
"It's tough to lose," the Mets' Mike Piazza said. "It's definitely disappointing."
The Mets placed first baseman Doug Mientkiewicz on the 15-day DL, a
day after he tore his right hamstring while warming up in the on-deck circle. They purchased the contract of infielder Jose Offerman from Triple-A Norfolk.