Giants see opportunity against Diamondbacks to close gap