Hanley Ramirez hit a go-ahead RBI double in the top of the ninth inning and the Los Angeles Dodgers trimmed a game off their division deficit with a 3-2 win against the NL West-leading San Francisco Giants on Saturday.