SAN FRANCISCO – Patrick Bailey hit a three-run home run in the bottom of the ninth for a walk-off victory, lifting the Giants to a 3-0 win over the Pittsburgh Pirates on Friday night at Oracle Park.