Jared Koenig allowed three runs on five hits in 4 2/3 innings and walked a career-high four.
The Oakland bullpen of Zach Puk, Zach Jackson (2-2), Sam Moll and Lou Trivino gave up four runs. Trivino got his third save with a scoreless ninth and went two scoreless innings.
Brad Keller (2-9) allowed five runs, four earned, on eight hits in 3 2/3 innings with four strikeouts and two walks.
Michael A. Taylor hit his fifth home run of the year for the Royals with a three-run outburst in the eighth to make it 8-7.
Bobby Witt Jr. hit a solo homer scratching a left wall in the third inning to open the scoring for Kansas City. It was his eleventh of the season, which matched Salvador Perez for the team lead.
Cam Gallagher went 2 for 3 with three RBIs on a pair of doubles. Gallagher scored twice in the fourth and Taylor in the sixth. The RBIs were his first since returning from a 45-game stint on the injured list on June 20.
Athletics: Before the game, manager Mark Kotsay said Chad Pinder was dropped from the roster due to a neck problem.
Oakland will pitch James Kaprielian (0-5, 5.98 ERA) in the series finale on Sunday. Brady Singer (3-2, 4.34 ERA) will take the mound for Kansas City.
More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP_Sports
Cody Friesen, The Associated Press