Billy Butler began the decisive inning with a leadoff walk off Michael Kirkman (0-2) and pinch-runner Hosmer went to second when Texas shortstop Alberto Gonzalez muffed a sure double-play grounder hit by Salvador Perez.
Jeff Francoeur followed by smacking a sharp grounder to Olt, but the third baseman's throw to second sailed into right field, allowing Hosmer to score easily with the game-winner.
Perez and Brayan Pena each drove in two runs for the Royals, who avoided a three-game sweep.
Greg Holland (5-3) earned the victory with two scoreless innings of relief.
Andrus was later taken out of the game with right shoulder soreness.
2014: The Year in Music [PHOTOS]