Joc Pederson singled in Patrick Bailey in the 11th inning, and the San Francisco Giants beat Boston 4-3 on Sunday for their first home series win against the Red Sox since 2004.