Jeremy Guthrie (5-6) fanned five and allowed two runs on seven hits over 7 2/3 innings for the Royals, who snapped a four-game skid on the heels of their 10- game winning streak.
Adrian Gonzalez belted a leadoff blast against Greg Holland in the ninth to whittle the deficit to 5-3, but the Kansas City closer recorded the final three outs in succession to notch his 22nd save of the year.
Zack Greinke (9-4) yielded five runs on 11 hits over 5 2/3 frames for Los Angeles, which had won five of its last six coming in.
The Royals jumped out to a 5-0 lead after plating a pair in the second, another in the fifth and two more in the sixth.
Perez belted a hanging slider for a leadoff shot into the seats in left to begin the second. Alcides Escobar hit a two-out single, advanced to second on a wild pitch and scored on Jarrod Dyson's base hit to left.
Dyson robbed Yasiel Puig of an extra-base hit in the fourth when he crashed into the wall after making a leaping grab at the warning track. He then led off the home half of the fifth with a base hit up the middle. Dyson stole second during Lorenzo Cain's at-bat and was pushed across on Cain's single to right.
Perez whacked a leadoff double to left in the sixth and scored three batters later when Escobar cracked a triple to right. Dyson then slapped a single to center to bring home Escobar for KC's five-run cushion.
LA finally got on the board in the eighth and ninth innings. Miguel Rojas and pinch-hitter Justin Turner hit one-out singles in the eighth and after Dee Gordon flied out, Hanley Ramirez hammered a one-hop double off the wall in left-center to bring them both home. Wade Davis came on for Guthrie and induced an inning-ending groundout off the bat of Puig.