Nate Freeman had a two-run double and a two-run home run to key the Oakland offense.
Gray (1-1), in his third appearance in the big leagues, gave up just one hit and one walk through five innings. Houston managed three more hits -- one each in the sixth, seventh and eighth innings -- before Gray left the game.
The Astros managed to get just two runners are far as second off Gray. One came in the seventh when Carlos Corporan singled and advanced on a wild pitch, and the other came on a Jonathan Villar doubled in the eighth.
Houston got a man as far as third in the ninth inning off reliever Dan Otero, when Corporan walked and Marc Krauss doubled with two outs. Otero then struck out Matt Dominguez to end the game.
Freiman added a two-run home run in the third, his third homer this year.
Exploding whale video goes viral on Internet
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need