Trailing 5-4 entering the ninth, Jed Lowrie tied it with a solo home run. But the Astros walked off with the win in the 12th inning Saturday.
George Springer led off the bottom of the 12th with a double down the right field line and moved to third on a Jose Altuve bunt. He came in to score the winning run on a first-pitch base hit to right field by Carlos Correa.
Kendall Graveman, who was moved up a day, gave up seven hits and five earned runs in 4.1 innings pitched.
The A's took a 3-0 lead in the second inning thanks to a two-run double by Chris Coghlan and a sacrifice fly by Josh Phegley that scored Yonder Alonso.
But Graveman gave back the three runs in the bottom half of the inning. Evan Gattis launched a two-run home run to get the Astros on the board. Luis Valbuena singled, moved to second on a walk to Marwin Gonzalez and advanced to third on a groundout by Jason Castro. Jake Marisnick brought Valbuena home with a sacrifice fly to tie the game.
An inning later, Houston took a 4-3 lead on an RBI-double by Colby Rasmus.
The Astros extended their lead in the fifth when Altuve scored on a single by Correa.
Danny Valencia's ninth home run of the season, cut the deficit to 5-4 in the six inning.
The A's were down to their final out when Lowrie touched up former teammate Luke Gregerson for his first home run of the season, a ball that barely cleared the short right field wall.