A's starter Sonny Gray allowed the first five batters to reach and score, including a three-run homer by D'backs shortstop Ketel Marte, but Oakland picked him up and went on to beat the Diamondbacks 21-13 Tuesday in Cactus League action.
Gray completed two innings and allowed seven earned runs on five hits and four walks.
Shortstop Marcus Semien went 3 for 3 with four RBIs while first baseman Yonder Alonso and third baseman Trevor Plouffe each had two hits.
Trailing 10-8, the A's scored 11 runs in the sixth to blow the game open.
Arizona starter Shelby Miller gave up six earned runs on five hits and two walks over 2 2/3 innings.
The Associated Press contributed to this report.