The victory gave Chicago (42-46) a split in Friday's day-night doubleheader. Kansas City (53-35) claimed a 4-2 decision in the early contest.
The left-handed Danks (5-8) departed in the seventh after walking Royals right fielder Alex Rios. But two relief pitchers wrapped up the inning without damage.
Right-handed closer David Robertson -- the fourth White Sox pitcher of the game -- worked a one-two-three ninth with two strikeouts for his 20th save.
Royals right-handed starter Edinson Volquez (8-5) worked 6 1/3 innings, departing after giving up a base hit to second baseman Carlos Sanchez and a sacrifice by shortstop Tyler Saladino that pushed Sanchez to second.
Left-handed reliever Franklin Morales allowed two more base runners but escaped the inning without any more damage.
Volquez, who suffered his first loss since June 5, gave up two runs on eight hits, walked two and struck out three.
Danks threw 96 pitches, walked four and struck out four on a humid night at U.S. Cellular Field. He now has three outings without a run this season.
Left fielder Melky Cabrera opened the White Sox sixth with a double to deep center and advanced to third on first baseman Jose Abreu's fly ball to the center-field wall.
Cabrera scored on Volquez's wild pitch with shortstop Avisail Garcia's at-bat, giving Chicago a 2-0 lead.
In the second inning, Garcia lined a two-out triple to deep right and scored the first run of the game after catcher Tyler Flowers' RBI single to left.
Chicago had runners on first and second with none out in the fourth, but Flowers grounded into an inning-ending double play.
In the Friday afternoon game, Mike Moustakas and Alex Rios each hit solo homers and right-handed starter Chris Young (8-5) allowed two runs, three hits and four walks with four strikeouts in five innings of Kansas City's 4-2 win.
Right-hander Greg Holland worked the ninth in the first game for his 20th save of the season.
White Sox right-hander Jeff Samardzija (6-5) suffered his first loss since June 7 after giving up four runs, four hits and three walks with three strikeouts in seven innings.
NOTES: The Royals entered Friday's games with 52 wins, the best in the American League and most for the team since 1973 when it had 55 at the All-Star break. ... Kansas City called up LHP John Lamb from Triple-A Omaha as the 26th man for Friday's split doubleheader. He is 9-1 with a 2.68 ERA for the Storm Chasers. ... Friday's first game was a makeup of an April 25 rainout at U.S. Cellular Field. ... The Royals also have makeups at the St. Louis Cardinals on July 23 and the Chicago Cubs on Sept. 28. ... Kansas City is scheduled to send RHP Jeremy Guthrie (7-5, 5.36 ERA) against Chicago's Jose Quintana (4-9, 3.69) in Saturday's game. Sunday's White Sox starter has yet to be determined. LHP Carlos Rodon or LHP Chris Sale are possible candidates. ... More than 20 players and coaches from the White Sox's 2005 World Series championship team are on hand this weekend for a 10th anniversary celebration. ... WLS-AM 890 will be the new home for White Sox baseball starting next season. A six-year deal was announced Thursday. ... Chicago called up RHP Frankie Montas from Double-A Birmingham as Friday's 26th player. He is 2-1 with a 2.47 ERA in 15 minor league starts.