KANSAS CITY, Mo. — Eric Hosmer hit a go-ahead homer in the seventh inning, and the Kansas City Royals rallied after losing outfielder Alex Gordon to a head injury to beat the Cleveland Indians 6-5 on a wild Wednesday night at Kauffman Stadium.

Hosmer connected with two outs off Indians reliever Cody Allen (3-1), one inning after Gordon collided with the bullpen fence while tracking a fly ball. The Gold Glove outfielder remained down on the warning track for several minutes before slowly standing up and walking off the field.

Will Smith (1-1) pitched 1 2-3 innings of scoreless relief for the Royals, and Greg Holland managed the ninth to help Kansas City snap a three-game skid against the Indians.

Holland worked around an error by shortstop Alicdes Escobar for his 18th save.

Jason Kipnis ended up with a three-run, inside-the-park homer on the play that Gordon was injured, extending his hitting streak to 14 games. But the bullpen failed to hold the 3-1 lead that he provided, ultimately snapping Cleveland's five-game winning streak.

The start of the game was delayed 2 hours, 37 minutes by a stubborn rain cloud that refused to budge from over the stadium, even though there were clear skies not more than a mile away.

The delay caused more problems in the seventh inning, when the clock hit midnight. A glitch in the stadium computer system caused about half of the lights to go out, and it took 12 minutes for them to cool enough to come back on and allow play to resume.

The Royals carried a 1-0 lead into the sixth inning in what was shaping up as a tidy pitching duel between Jeremy Guthrie and Indians counterpart Scott Kazmir.

Michael Bourn and Asdrubal Cabrera led off the sixth with singles, and Kipnis hit a fly ball deep to left field. Gordon was tracking it the whole way but slammed his head into the fencing of the Royals bullpen as he leaped for the ball, crashing into a heap on the warning track.

He remained down while Kipnis rounded the bases for the Indians' first inside-the-park homer since Jhonny Peralta toured the bases against Detroit on July 18, 2010.

Gordon was eventually helped from the field by Royals trainer Nick Kenney. The team said he had a possible concussion and a bruised right hip, and he will be evaluated again on Thursday.

The Royals regained the lead in the bottom of the sixth, pecking away with five singles and taking advantage of a wild throw on a pickoff attempt. The error was given to first baseman Nick Swisher and allowed Lorenzo Cain to score from third, giving Kansas City a 5-3 lead.

That lead also turned out to be short-lived.

After the lights went out and were finally restored, Guthrie promptly walked the Indians' Ryan Raburn and Yan Gomes. The right-hander was lifted for Smith, who gave up a run-scoring single to Bourn and a tying sacrifice fly to Cabrera but recovered to keep the game tied.

That's when Hosmer went deep off Allen in the seventh inning.

The Royals' hot-hitting first baseman turned on a 1-0 pitch and sent it soaring into the night, the ball landing well beyond the center-field fence for his eighth homer of the season.

Kansas City loaded the bases in the eighth but failed to tack on an insurance run, but it turned out to be a moot point. Holland struck out Mark Reynolds, and after Escobar's error he got Jason Giambi to fly out and Bourn to strike out shortly after 1 a.m. CT to end the game.

Notes: Bourn was activated from the paternity list before the game and LHP Nick Hagadone optioned to Triple-A Columbus. ... Jarrod Dyson took over CF when Gordon was injured. Cain slid from center to right and David Lough from left to right. ... Indians RHP Ubaldo Jimenez will take the mound for a July 4 matinee against Royals RHP James Shields.