The Royals faced a 4-0 deficit early on and trailed 7-6 before Alcides Escobar tied things with a RBI single in the eighth.
Wade Davis (5-1) recorded his 13th straight scoreless appearance in the eighth to pick up the victory, Kansas City's fourth in its last six games, and Greg Holland posted his 16th save with a flawless ninth.
Alex Gordon belted a three-run homer to highlight a 13-hit attack for the Royals, who finished an efficient 6-for-11 with runners in scoring position.
St. Louis went 2-7 on a disappointing homestand despite receiving a grand slam by Kolten Wong and a solo homer from Peter Bourjos on Tuesday.
Celebrity Families of 2014 [PHOTOS]