With the bases loaded and nobody out, Cabrera hit a sharp grounder to Barmes, who was playing in at the edge of the infield grass. He made a low throw home that bounced in front of catcher Rod Barajas, who tried to make a backhand stop as the ball skipped away.
"He hit it hard like he always does," Burriss said. "At that point there was nothing I could do but run. The bases were loaded."
The Giants earned their second straight series victory, after Matt Cain tossed a one-hitter in a 5-0 win Friday. Pittsburgh has dropped five straight, while San Francisco has won four of five since getting swept in three one-run losses at defending NL West champion Arizona to open the season.
The win was a nice morale boost for the Giants on a night they learned All-Star closer Brian Wilson is likely headed for surgery and could miss the season because of structural damage and a ligament problem in his troublesome right elbow. He will go on the disabled list Sunday, when Ryan Vogelsong is activated from the DL to start the series finale.
"It's going to take getting everybody to contribute," Giants manager Bruce Bochy said. "Right now they're doing that."
Burriss hit a leadoff single in the ninth off Chris Resop (0-1), and pinch-hitter Ryan Theriot followed with a sharp single to right that moved Burriss to third. Pirates manager Clint Hurdle visited Resop, and Angel Pagan drew an intentional walk to load the bases for Cabrera, who delivered to chants of "Melky! Melky!" from the sellout crowd of 41,657.
"The ball was hit hard to me. I had plenty of time to catch it, square myself and make a good throw to Rod," Barmes said. "I caught the ball and just tried to be too quick and make a good throw. That play, that part of the game, you have to make that play. No excuses for it. I didn't."
Lopez (1-0) retired one batter for the win, striking out Alex Presley to end the ninth with the potential go-ahead run on second.
"Our bullpen runs deep," Giants starter Barry Zito said. "That's what makes us so great late in games."
Pagan tripled, singled, scored a run and stole his first base for San Francisco, and new shortstop Brandon Crawford made several snazzy plays with his glove. Pagan is 9 for 12 against Pittsburgh starter Charlie Morton.
Pablo Sandoval made it 3-all in the fifth on an RBI infield single that he lined toward Morton, and the Kung Fu Panda has hit safely in each of the first eight games.
Pittsburgh took a 3-2 lead in the top half on a pair of errors on the same play. Sandoval misplayed Jose Tabata's grounder at third base and the ball went under his glove into left field. Crawford, backing up Sandoval, then threw wildly to second, allowing Presley to score.
Sandoval committed a second fielding error in the sixth for his fourth career multierror game. His last came Aug. 9, 2011, also against the Pirates. He has three errors already this season after making just 10 last year.
Nate Schierholtz's triple drove in a run in the second, then Burriss added an RBI single.
It was another encouraging outing for Zito after he tossed his first shutout in nine years in a four-hit, 7-0 victory at Colorado on Monday to give the Giants their first victory of the year.
Zito allowed three runs -- two earned -- and six hits in seven innings, struck out four and walked one.
The left-hander, who was asked by San Francisco band Train to play with them during their concert in the city Sunday night, went seven or more innings in back-to-back starts for the first time since July 31 and Aug. 6, 2010. He was left off the roster for all three postseason rounds that year when the team won the World Series.
Morton came off the disabled list to make his 2012 debut after recovering from offseason hip surgery. He hung tough for five innings, allowing three runs on seven hits with two strikeouts and no walks.
Giants 2B Freddy Sanchez is close to joining Triple-A Fresno to make some rehab appearances before returning to San Francisco from his shoulder injury. ... The Giants held a moment of silence in tribute to Matty Alou, who died during the offseason at age 72. He made history as a member of an all-Alou outfield for San Francisco with brothers Felipe and Jesus. ... Rock band Jefferson Starship performed before the game and sang the national anthem. ...Cain presented 49ers QB Alex Smith with an official Giants jersey signed by players to wear to postgame interviews with his signature San Francisco cap.