"When I hit it, I knew it was gone," said Garciaparra, who fouled off two fastballs before connecting. "I was able to get one where I got the barrel on it. I was just battling, trying to keep the inning alive because the guys behind me are swinging the bat well."
Garciaparra, who is going to his sixth All-Star Game and first as a National Leaguer, drove an 0-2 splitter from Jeremy Accardo (1-3) into the bullpen in left with one out in the eighth. It was his 11th homer of the season and it broke a 6-6 tie.
"It's my fault. It's all on me. I just didn't throw it where I needed to," Accardo said. "I hung it. And if you hang a pitch like that to a good hitter, he's going to beat you every time. ... I can't put a finger on why it hung. I tried to throw it in the dirt."
Cesar Izturis capped the decisive rally with an RBI single, his third hit. Danys Baez (5-4) pitched a hitless eighth for the victory. Takashi Saito got three outs for his seventh save in as many chances, just hours after the Dodgers announced that former All-Star closer Eric Gagne would undergo season-ending back surgery on Saturday.
Bonds gave the Giants a 5-4 lead in the third with a three-run shot, his first home run in 26 at-bats since June 24. The seven-time NL MVP, who is 35 home runs behind all-time leader Hank Aaron, added an RBI single in the ninth.
"We know that Barry's going to drive in runs," manager Felipe Alou said. "He had a number of hittable pitches in a couple of the games in Arizona that he just missed and popped up, but we knew he was going to get back his stroke. I could tell by the way he took BP today. He even hit a ball over the roof and into the parking lot."
The Dodgers took a 6-5 lead in the sixth against Giants starter Matt Morris when Russell Martin, who led off with a double, scored on a throwing error by right fielder Moises Alou after he caught a fly ball by Matt Kemp with Martin on third.
The Giants tied it in the seventh on a two-out RBI single by Ray Durham, who hit his 11th home run in the second.
Dodgers rookie Chad Billingsley allowed five runs -- four earned -- and six hits over 5 1/3 innings and remained winless in five major league starts. The 21-year-old right-hander, a first-round draft pick by the Dodgers in 2003, was the organization's minor league pitcher of the year last season and was promoted from Triple-A on June 14.
Bonds, who hit his first major league home run eight weeks before Billingsley's second birthday, drove his 12th homer of the season an estimated 449 feet into the pavilion seats in right-center with two outs in the third.
Billingsley is the 426th pitcher to give up a home run to the 13-time All-Star. Bonds, who turns 42 on July 24, has hit 63 home runs against the Dodgers, 28 in Los Angeles. He had one hit in 19 at-bats against the Dodgers this season before the home run.
"We didn't expect to go the whole year without seeing one, and he gave us a glimpse of what he's been doing all these years," Dodgers manager Grady Little said.
Los Angeles tied it at 5 in the fifth inning on an RBI single by rookie Andre Ethier.
Dodgers second baseman Jeff Kent sat out his fourth straight game because of a strained muscle in his left side. Center fielder Kenny Lofton, another former Giant, left the game with tightness in his right hamstring after running out a sacrifice bunt in the first inning. Their replacements, Ramon Martinez and Kemp, both drove in runs in the first two innings.
Garciaparra and J.D. Drew both extended their hitting streaks during the Dodgers' three-run first. Garciaparra made it 19 straight with an RBI single, Drew followed with a double that gave him 13 consecutive games with a hit. Martinez drove them in with a two-out double that gave Los Angeles a 3-1 lead.
Kemp gave the Dodgers a 4-2 lead in the second with an RBI groundout after Alou misplayed Martin's sinking liner into a triple. The 40-year-old Alou was playing his second game after missing 2 1/2 weeks because of a lower back strain.
Morris allowed six runs - five earned - and a season-high 10 hits over six innings.
- Gagne's surgery to repair a herniated disk in his lower back will be performed by Dr. Robert Watkins at St. Vincent Medical Center.
- Garciaparra's longest hitting streak in the big leagues was 30 games, in 1997 with Boston. He is only the second player in history to make an All-Star roster as a shortstop and a first baseman. The other was Hall of Famer Ernie Banks.
- The only players to represent the Dodgers and Giants in an All-Star Game are Kent and C Tom Haller, who replaced Spec Richardson as Giants general manager exactly 25 years ago Friday.