The Royals hit three home runs, including a go-ahead blast in with two-out in the ninth by Brandon Moss for a short-lived 4-3 lead.
Jake Marisnick, who entered the game as a defensive replacement in the eighth, forced extra frames with a one-out ninth-inning home run off Royals closer Kelvin Herrera.
The Royals' first two homers came off starter Lance McCullers Jr. Marwin Gonzalez's two-run home run off Travis Wood in the the seventh had tied it at 3.
homered for a fourth straight game and Mike Moustakas hit his third homer of the season for the Royals.