Kurt Suzuki stroked a one-out double off Joakim Soria (0-2) in the ninth and one out later Rosales hit a sharp grounder up the middle. The throw from center fielder David DeJesus was on target but Suzuki slid around catcher Jason Kendall's tag to score the go-ahead run.
Andrew Bailey hurled a scoreless bottom of the ninth to pick up his 19th save and Oakland posted its second win in a three-game set with the Royals.
Rosales went 3-for-5 and drove in a pair of runs and Kevin Kouzmanoff got three RBIs for the victors.
Yuniesky Betancourt socked a grand slam homer and doubled for Kansas City.
Lytro unveils camera that can focus a photo after shooting it
Yosemite climber falls 30 feet, suffers major injuries