The Giants began a pivotal series by holding on to beat the Padres in the first game of a doubleheader.