KANSAS CITY, Mo. -- Alex Gordon got two pitches he could handle Sunday, and the Kansas City Royals' offense broke out of a funk.

The Royals left fielder drove in a career-high six runs with two three-run homers, and right-hander James Shields pitched seven solid innings as Kansas City beat the Baltimore Orioles 8-6 Sunday afternoon to split a four-game series.

Kansas City scored only two runs in the first three games before breaking out in the series finale.

"You saw it today. It's great," Gordon said of the offensive splurge. "It takes a lot of pressure off the pitching staff. Shields was great today. He gave up just a lot of infield hits and stuff like that. He had that one long inning. Typical Shields and puts up seven great innings."

Gordon, who finished 4-for-4, went deep with two outs in the fifth off right-hander Ubaldo Jimenez to turn a 3-2 deficit into a 5-3 Royals lead. Right fielder Nori Aoki, who walked, and designated hitter Billy Butler, who singled, were aboard for Gordon's second home run of the season. His first was April 9, 134 at-bats earlier.

Two innings later, Gordon's second three-run shot bumped the margin to 8-3.

"Ubaldo (threw) a fastball that caught a lot of plate," Gordon said. "I've been missing a lot of pitches. When I got my pitch today, I didn't miss it. He gave me a fastball that was hittable.

"Patton (threw) a slider. I just adjusted and put a good swing on it."

Shields (6-3) gave up three runs on nine hits, walking one and striking out three. All the runs and five of the hits off Shields came in the third inning.

"He really had to grind through the third inning, and a lot of balls they hit just found holes," Royals manager Ned Yost said. "At the end of that inning, (pitching coach) Dave Eiland turned to me and said, 'That's it, that's all they're going to get off him.' And he was right."

Jimenez (2-5) surrendered five runs on eight hits while striking out seven and walking one.

Center fielder Adam Jones hit a three-run home in the ninth off right-hander Aaron Crow to cut the Orioles' deficit to two runs. Royals closer Greg Holland got the final two outs on ground balls for his 12th save.

"This game ain't easy," Jones said. "You've got 27 outs to go. This team doesn't give up. We fight to the last out. I'm sure they didn't want to bring in their closer. We just keep fighting and battling until the last out is made."

The Orioles sent eight men to the plate in a three-run third. Shortstop J.J. Hardy, left fielder David Lough and second baseman Jonathan Schoop (a bunt) opened the inning with singles to load the bases.

Right fielder Nick Markakis singled to right, scoring Hardy and Lough with Schoop taking third. Third baseman Manny Machado flied out to right to bring home Schoop.

"Shields is one of the best pitchers in the America League," Orioles manager Buck Showalter said. "Our guys had a good approach. We needed a couple of zeros (after scoring three in the third), but they were able to add on and we weren't. Adam got us back into it at the end. We presented ourselves with some opportunities. At this level, if you make two mistakes to a good hitter (Gordon), they are going to make you pay, and unfortunately it came with some runners on base."

Jimenez, who had not allowed a run in his previous 11 innings, gave up a run in the first. Aoki led off with a bunt single, his 10th infield hit. Aoki advanced to third on two groundouts and scored when Butler laced a 1-2 pitch to right. That was the same formula the Royals used in the first inning Saturday for the game's only run, with Butler's two-out single bringing home Aoki.

The Royals got a run in the fourth with the help of a replay challenge. With one out, Gordon singled, but he was called out at second on a bang-bang play on catcher Salvador Perez's grounder up the middle. Schoop made a diving stop and apparently recorded the forceout.

Royals manager Ned Yost challenged the call, and it was overturned after an 89-second review, with Gordon called safe. Center fielder Lorenzo Cain singled to center, driving in Gordon.

NOTES: In a salute to the Negro Leagues, the Royals wore mid-1920s cream and navy blue Kansas City Monarchs jerseys, while the Orioles were adorned in late 1920s Baltimore Black Sox jerseys. ... Royals backup C Brett Hayes is still looking for his first hit. He is 0-for-16 in 10 games. ... Royals LHP Jason Vargas, who starts Monday against the White Sox, has walked one in 13 2/3 innings in his past two starts. ... Orioles CF Adam Jones extended his hitting streak to 13 games.