The A's got a Josh Reddick home run in the seventh that tied the score 4-4 but didn't have another hit until Gomes led off the 10th with a tap that rolled down the third-base line and bumped the base.
Daric Barton, after an out, had a pinch-hit single to right that got Gomes to third and Ka'aihue lined a base hit to right to get the lead run in.
That gave Ryan Cook (1-0) his first major-league win after two innings of no-hit relief. Brian Fuentes pitched a one-hit 10th for his third save.
Texas reliever Mike Adams (0-2), who only got one out in the 10th, took the loss.
Oakland jumped out to a 3-0 lead in the first when the first five A's batters reached base. Gomes doubled in one run and Kurt Suzuki doubled in two others.
Texas came back with two runs in each the fourth -- a two-run home run by Mitch Moreland -- and the sixth -- another Moreland home run and an apparent blown call in which pitcher Brandon McCarthy appeared to have caught a popped up bunt but the play was ruled a trap and a run scored.
Reddick's 10th home run of the season made the score 4-4.
Duggar sisters unveil Christian dating rules in new book
Beautician charged with giving client fatal silicone butt injection