Clint Robinson gave the Royals the lead, following Hosmer's single, with a two-run double off John Grabow. Hosmer, who went 2-for-3 in the win, added a sacrifice fly in a two-run ninth to cap the scoring.
Ivan DeJesus had three hits and drove in two runs for the Dodgers.
The Dodgers rattled Royals starter Danny Duffy in the first inning. Dee Gordon led off with a single and stole second before Duffy made another pitch, catching the infielders with their backs turned and taking off from first base as the next batter, Jerry Hairston, stepped into the box.
After Hairston blooped a single, Duffy balked Gordon home and Matt Kemp singled home Hairston.
"What can I say? We had a dumb moment, but you can't have those in the big leagues. We've got to clean it up a little bit. That was my fault," Duffy said.
Lorenzo Cain slugged a two-out solo homer in the fourth inning to chase Dodgers starter Chad Billingsley after 3 2/3 innings.
The Dodgers strung three hits together in the fourth off Royals reliever Joakim Soria for a run, the RBI going to reliever Todd Coffey on a bouncing single into right field. Coffey is 0-for-7 with five strikeouts batting in regular-season games.
Kansas City scored in the fifth off Coffey with a bunt single by Irving Falu, who stole second and with two out was singled home by Hosmer. But the Dodgers got to Soria again in the fifth on two hits, a walk, a hit batter and a balk -- the second for Royals pitchers on the day.
Up next for the Dodgers: Ted Lilly starts for the Dodgers on Friday against right-hander Greg Reynolds when the Dodgers face the Rangers at 1:05 p.m. PT. Scheduled to follow Lilly are back-end relievers Javy Guerra, Kenley Jansen and Scott Elbert, who last pitched Tuesday in a simulated game. Also on the list is Wil Ledezma. Clayton Kershaw, who flew to California on Thursday to receive the L.A. Sports Council's 2011 Sportsman of the Year Award at Club Nokia, is expected to be back in camp Friday for a bullpen session.
Ken Gurnick is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.