Clinging to a 2-1 lead in the fifth inning, the Giants put two runners abroad with two outs against Jamey Wright and Scutaro scorched a pitch down the right-field line, chasing home both runners to double the advantage.
Barry Zito (15-8) earned the win, yielding a pair of runs on six hits over six frames.
Sergio Romo tossed a scoreless ninth for his 14th save.
Chris Capuano (12-12), absorbed the loss for Los Angeles, which fell short in its pursuit of the St. Louis Cardinals for the second and final NL wild card berth.
A.J. Ellis slammed a two-run homer for Los Angeles.
McPhee, Cokas 'working on their marriage' after affair
Duggar sisters unveil Christian dating rules in new book