Donaldson reached base four times for the A's, who padded their AL-best home record by taking two of three in this interleague series. Oakland has won 16 of its last 19 games at the Coliseum.
Milone gave up three home runs and pitched with runners in scoring position in four of the six innings he worked, but got the win after the A's rallied from deficits of 3-0 and 5-2.
Oakland had seven extra-base hits - five off St. Louis starter Jake Westbrook. Westbrook (4-3) lasted just four innings and gave up six runs and 10 hits overall.
Lowrie's go-ahead home run was the big blow, while Donaldson's solo shot off reliever Trevor Rosenthal capped the A's best offensive day in two weeks.
Oakland remained a half-game behind Texas in the AL West and improved to 26-13 at home. The A's are also 48-35, their best record after 83 games since 1992.
Milone (7-7) overcame his rocky outing to win for the first time since June 3. Oakland's left-hander allowed seven hits over six innings with five strikeouts and two walks. The three home runs allowed by Milone also matched a season-high.
St. Louis, which began the day one game behind Pittsburgh in the NL Central, took a pair of early leads but couldn't make them hold up.
Beltran and Craig hit back-to-back home runs in the first inning to give the Cardinals a 3-0 lead. It was Beltran's team-leading 19th homer while Craig's blast was his third on the Cardinals current road trip.
Carpenter's solo home run in the third off Milone made it 4-2. Lowrie, Oakland's shortstop, later let Matt Holliday's grounder go through his legs and was slow to retrieve the ball, allowing Beltran to score from second.
Oakland scored twice in the third with the help of two errors, then went ahead 6-5 on Lowrie's two-run homer off Westbrook in the fourth after Chris Young's leadoff single.
Donaldson added his 13th homer of the season in the seventh.
Notes: Oakland CF Coco Crisp left the game in the fourth inning with back spasms. ... Cardinals 1B Matt Adams was a late scratch due to food poisoning. His replacement, Ty Wiggington, went 0-for-3. Adams struck out as a pinch-hitter in the ninth... A's RHP Jarrod Parker is still nursing a strained right hamstring but will attempt to throw a bullpen session on Tuesday. Parker left Saturday's game after injuring his leg with two outs in the fourth inning. ... Cardinals RHP Shelby Miller threw an extended bullpen before the game. Miller threw 61 pitches in his previous start on Friday. ... Oakland RHP A.J. Griffin (6-6) pitches the series opener against the Cubs on Tuesday. ... RHP Lance Lynn (10-3) takes the mound for the Cardinals in their first-ever visit to Anaheim to play the Angels.
Link to box score: Oakland 7, St. Louis 5
Link to game discussion at The Cardinal Nation message board