The Royals, trailing 2-0 and facing Tigers closer Jose Valverde in the bottom of the ninth, were down to their last strike when Cain extended the contest by belting a two-run homer over the left-center field fence.
After Alex Gordon grounded out, Hosmer sent a sharp grounder up the middle for the game-ending blow.
Greg Holland (2-1) earned the victory for the Royals, who took 2-of-3 from the Tigers.
Tigers starter Justin Verlander hurled seven shutout innings, yielding just three hits and two walks while striking out eight, but ended with a no-decision.
Celebrity Breakups and divorces of 2014 [PHOTOS]