KANSAS CITY, Mo. -- With one swing, Alex Gordon turned a miserable night at the plate into a glorious ending.
Gordon stranded six runners in his first three at-bats, including striking out with the bases loaded in the third and grounding into an inning-ending double play in the fifth with runners on the corners.
Gordon, however, made amends by hitting a three-run homer with two outs in bottom of the ninth as the Kansas City Royals rallied for a 7-5 victory over the Baltimore Orioles on Friday night to snap a five-game losing streak.
"At first I kind of knew," Gordon said of it being a homer. "I've been having some bad luck. I was hoping somebody wouldn't jump over the fence and catch it. Even when I hit it, I was kind of like, Please don't catch it. When it went over the fence, it was like a sign of relief. Once it went over, there was definitely excitement.
"I gave a pumped fist, said a couple of bad words and it seemed like I got around the bases to see my teammates smiling at me, so it felt good. I got a couple of punches in the eye [at the home plate mob scene]. Seeing the celebrations before, I just didn't want to get hurt, so I took it pretty easy."
Orioles closer Alfredo Simon (2-2) retired the first two batters in the ninth before walking Rick Ankiel and giving up a single to Wilson Betemit. Gordon's second home run of the season landed in the Royals bullpen.
"I tried to use my split on 3-and-2 to Ankiel," Simon said. "The next guy [Betemit] hit a fastball, and the last guy [Gordon] hit a fastball. My best pitch, my split, wasn't working tonight, so I just tried to throw a strike and he got it."
It was the Royals' first walk-off home run since David DeJesus on July 12, 2008, against Seattle. Gordon said his previous walk-off home run was in 2006 with Double-A Wichita.
"But never in the big leagues," Gordon said. "This is probably one of the highlights of my career so far."
Blake Wood (1-2), who worked the ninth, picked up his first major league victory.
"We needed a win in a bad way," Royals manager Ned Yost said. "We've been struggling to score some runs and our pitching's been struggling to keep us in games. It's just great for Alex to hit the walk-off because earlier he hit into a double play and struck out with the bases loaded. For him to come through there was huge."
Ty Wigginton went 3-for-4 with two RBI doubles for the Orioles, who scored two runs in the top of the eighth to take a 5-4 lead. Nick Markakis led off the Baltimore ninth with a single and scored from first on Wigginton's double to right-center. Wigginton stopped at third on Luke Scott's single.
Adam Jones hit a bouncer to Betemit at third, who fumbled it, allowing Wigginton to score, giving the Orioles a 5-4 lead.
"We've got to win the games we're supposed to win and that was one of those," Orioles interim manager Juan Samuel said. "We got the lead to the closer and we should win that game."
The Royals took a 3-0 lead in the first. Betemit had a two-run single and Ankiel doubled home Jason Kendall.
Jones walked to lead off the Orioles second, stole second and advanced to third on catcher Kendall's throwing error. He scored on Felix Pie's sacrifice fly and Wigginton doubled home Markakis in the third to cut the lead to 3-2.
The Orioles tied it in the sixth, when Markakis led off with a walk, took third on Wigginton's single and scored on Scotts sacrifice fly.
Right-hander Sean O'Sullivan, making his second Royals start since being acquired in a July 22 trade with the Los Angeles Angels, allowed three runs, four hits and two walks in six innings.
Orioles rookie starter Jake Arrieta was pulled after 4 1/3 innings, giving up three runs, six hits and five walks.
IF Josh Bell worked out with the Orioles on Friday, but could not be officially added to the 25-man roster before Saturday. He was optioned July 21 to Triple-A Norfolk and must stay off the big league roster for 10 days. He will take the roster spot of IF Miguel Tejada, who was traded Thursday to San Diego, for minor league pitcher Wynn Pelzer. ... Royals DH Jose Guillen led off the fifth with a double, the 300th of his career.
Hernandez single in 9th lifts Dodgers over Blue Jays 3-2
Kike Hernandez capped a three-run ninth inning by blooping a single to score Corey Seager and the Los Angeles Dodgers beat the Toronto Blue Jays 3-2 Thursday night after being one-hit through eight innings.
Orioles set mark for HRs allowed in late-night loss to Rays
The Baltimore Orioles set the major league record for home runs allowed in a season, giving up drives to Austin Meadows and Willy Adames in a rain-delayed, 5-2 loss to Tampa Bay that ended shortly before 1 a.m. Friday.
Dodgers rally in 9th to walk off for 2nd straight game
The Dodgers come back in the ninth inning to tie the game then beat the Blue Jays on Enrique Hernandez's walk-off single.
Vlad Jr. doubles Blue Jays' lead with his 15th HR
Vlad Guerrero Jr. takes Kenta Maeda deep in the sixth inning to increase Toronto's lead.
Syndergaard, Mets sweep Indians 2-0 for 5th win in row
Noah Syndergaard retired the first 16 hitters and allowed two hits over six dominant innings before a heavy storm interrupted him, and the New York Mets beat the Cleveland Indians 2-0 Thursday night in a rain-shortened game for their fifth straight win.
Roark strikes out seven, pitching A's to sweep of Yankees
Tanner Roark struck out seven and didn't walk a batter over six-plus innings, Yankees starter Masahiro Tanaka struggled early and the Oakland Athletics beat New York 5-3 Thursday night for a three-game series sweep.