The game completed a series that was pushed back a day by poor weather Friday. Kansas City won two of three games against the White Sox but saw a four-game winning streak end Monday.
Chicago didn't manage a hit until the sixth inning and didn't score a run until there were two outs in the ninth but escaped with the victory. Danks, batting for the first time Monday, hit a 2-2 pitch from Kelvin Herrera (2-3) well beyond the wall in right-center field with two outs in the 11th.
Jesse Crain (1-1) pitched one inning and was credited with the win and Addison Reed finished the game for his 11th save.
Kansas City was ahead 1-0 three batters into the game, with Billy Butler's RBI double creating a lead and that stood until the ninth.
Greg Holland came on in relief for the Royals in the ninth but allowed three straight singles. He started a pitcher-home-first double play but, after a walk, gave up game-tying single by Alexei Ramirez.
The game's starting pitchers battled through a very good pitchers' duel but neither figured in the decision.
Kansas City's James Shields took a no-hitter into the sixth and left after eight innings, having allowed two hits and two walks against nine strikeouts.
Chris Sale, the Chicago starter, gave up five hits and one run in the first two innings but then retired 16 in a row. He was pulled after 7 1/3 innings after a six-hit, five-strikeout outing.
Lytro unveils camera that can focus a photo after shooting it
Easer Egg Roll brings thousands to White House