Gallagher let one run to score on four hits while improving to 5-6 against the Angels, who have already clinched the American League West. He notched six strikeouts.
Ryan Sweeney collected four hits, scored twice and drove in a run for the winners. Jack Hannahan homered for Oakland.
John Lackey (11-4) gave up four runs on nine hits in 5 1/3 innings for the Angels, whose five-game win streak ended.
Kendry Morales homered for the Angels.