Donaldson's blast into the left-field seats off Boone Logan (2-2) snapped a 4-4 tie and gave the A's the rubber match of a three-game series at Yankee Stadium.
Yoenis Cespedes added a two-run clout and Luke Montz went 2-for-4 with a solo shot in the victory.
Sean Doolittle (2-0) earned the decision with a scoreless seventh inning and Grant Balfour corralled his fifth save despite allowing a hit and walk in the ninth.
Yankees starter Andy Pettitte (3-3) was reached for four runs (three earned) on four hits over five full frames.
Lyle Overbay drove in a pair of runs for New York.