Adrian Del Castillo smashed a two-run shot, and Jordan Lawlar drove in the game-winning run with an infield single in the ninth as the Arizona Diamondbacks rallied from an early four-run deficit to walk off the San Francisco Giants 6-5.