A fifth-inning home run by veteran third baseman Evan Longoria was enough to lead the San Francisco Giants to a narrow Game 3 win and a 2-1 lead over the Los Angeles Dodgers in the NLDS.