Cain's go-ahead double in the sixth put the Royals up for good at 2-1.
"I've been swinging at everything lately," Cain said. "I've been playing terrible lately. So yeah, this felt good."
It was especially sweet for Cain and the Royals because it came against White Sox lefty John Danks, who entered the contest with a 9-1 career mark against the Royals.
"He's always had our number," Cain said. "You have to stay on his offspeed stuff and then be aggressive. I hit a fastball and then a curve. Fastball was first pitch. You just have to stay aggressive."
And just getting a win was significant after two difficult losses in Detroit to finish the road trip 4-6.
"We lost two in Detroit and that hurt," Cain said. "But we're on the ground every day and we bounced back. That was good to get a win against a division team."
The three runs were just enough support for right-hander Edinson Volquez.
"We've scuffled a few times getting runs for him," Cain said of Volquez. "He's been dominant all year for us, so this felt good."
Jeffrey Flanagan is a reporter for MLB.com. Follow him on Twitter at @FlannyMLB. This story was not subject to the approval of Major League Baseball or its clubs.