The Giants slugged five home runs and collected three hits with runners in scoring position in a reversal of what has ailed them lately.