Oakland won for the 18th time in 21 games and jumped past Texas into first place in the American League West.
The A's were two games below the .500 mark on May 13 and they are now 13 games over the breakeven plateau.
Chicago had a 3-0 lead heading into the sixth and starter Chris Sale (5-4) had given up just two hits over the first five innings.
Adam Rosales, however, singled to open the inning and Jed Lowrie singled one out later. Yoenis Cespedes drew a four-pitch walk to load the bases and Donaldson followed by launching a 1-1 pitch over the wall in right.
It was Donaldson's ninth homer of the season.
Oakland starter Jarrod Parker (5-6) benefited from the home run to get the win. He gave up three runs (two earned) on five hits in seven innings. Grant Balfour struck out one in a perfect ninth for his 15th save.
Chicago built its lead with single runs in the third, fourth and fifth innings. Tyler Flowers opened the scoring with a solo home run.