Romo dangled the delivery that Ramirez hammered too far over home plate.
"It backed up on him," Giants catcher Buster Posey said.
But the full-count slider to Ethier was more typical of Romo, whose 0.60 ERA entering the game was the lowest among Major League relievers who had thrown at least 30 innings. It seemed to shave the periphery of the strike zone, as any pitcher would want. But umpire Ed Hickox ruled it as ball four.
Posey didn't complain about the call, though he remarked, "That's one we defintely want. I guess [Hickox] saw it [as] inside."
The outcome, which reduced San Francisco's National League West lead to two games over the Dodgers, was somewhat of a rarity. It was only the Giants' third loss in 10 extra-inning games. They had won the series opener in 11 of their previous 12 tries. San Francisco's four-game home winning streak against the Dodgers dissolved.
"It's tough to lose those extra-inning games at home," Giants manager Bruce Bochy said. "But the guys played well."
Melky Cabrera and Brandon Belt accounted for most of the Giants' offense, each going 3-for-5. Belt's biggest hit was a two-run, eighth-inning single that forged a 3-3 tie and ended a personal 0-for-17 skid with runners in scoring position.
Belt, whose fortunes have fluctuated all season, noted that he had stopped overanalyzing himself.
"The goal is to go out there and relax," said the first baseman, who equaled a single-game season high for hits that he previously reached July 1 against Cincinnati.
San Francisco opened the scoring in the second inning on Nate Schierholtz's bases-loaded, fielder's-choice grounder. That followed singles by Belt and Matt Cain, which were sandwiched around a walk to Brandon Crawford.
But Cain, who worked seven innings, allowed three hits apiece in the fifth and sixth innings after blanking Los Angeles on three hits through four innings.
With two outs in the fifth, Cain had an 0-2 count on opposing pitcher Stephen Fife, who ultimately doubled. Jerry Hairston Jr. sliced an RBI double into the right-field corner and scored on Mark Ellis' single. That ended the Giants' streak of pitching 31 scoreless innings against the Dodgers, who were shut out in three consecutive games during their previous visit here June 25-27. That total matched a San Francisco-era record that the Giants also reached in 1960 against the Phillies and in 1964 against the Mets.
Los Angeles added a run in the sixth. Ethier's leadoff double lifted his career batting average against Cain to .480 (24-for-50). Ethier advanced to third on a groundout and scored on James Loney's single.
Trailing, 3-1, the Giants began their eighth-inning uprising against Ronald Belisario with Cabrera's leadoff single. Posey struck out before Angel Pagan's ground-rule double sustained the rally. Up came Belt, who broke his bat on Belisario's 0-1 pitch but made enough contact to guide the ball into center field, scoring Cabrera and Pagan.