Pablo Sandoval hit a two-run double in a four-run fourth inning and the San Francisco Giants rallied from an early five-run deficit to beat the Chicago Cubs 7-6 Thursday.