KANSAS CITY -- Just one thought entered Salvador Perez's mind as he hit that ninth-inning ground ball toward the shortstop.
"Double play," said the Royals' catcher.
That's what Angels second baseman Howie Kendrick, on-deck hitter Omar Infante and 27,803 fans at Kauffman Stadium were thinking as well. But it didn't happen.
Nope, shortstop Erick Aybar's throw went right through Kendrick's hands and the error set up Infante's single that gave the Royals a 5-4 victory on Sunday afternoon. It was their first walkoff win this season.
The score was 4-4 when Jason Grilli, in just his second appearance since being acquired by Los Angeles, came in and began the Kansas City ninth with a strikeout of Billy Butler. But then, Grilli's 0-2 pitch grazed the front of Alex Gordon's jersey and maybe home-plate umpire Todd Tichenor heard something. He sent Gordon to first base.
"Just good ears by the umpire," Gordon said. "I knew it hit me, but sometimes when it hits the jersey, they don't catch it all the time and he was all over it. That was big, especially down 0-2. If he comes anywhere near my body, I'm not getting out of the way. Try to get a rally started and that's what happened."
Perez sent the next pitch bouncing to Aybar and it had end-of-inning written all over it.
"I was thinking it was a double play," Infante said. "Salvador doesn't run fast and they've got a good infield, too."
But Aybar's flip to Kendrick at the bag went through him and into right field. Gordon wound up at third base and Perez was safe at first where Pedro Ciriaco pinch-ran for him.
"I just peeked too soon. That's all," Kendrick said. "Good throw. A good feed by Aybar. I just missed it. It came off the glove. It happens sometimes. Grilli did a great job getting us a DP ball. You feel bad because the pitcher did a great job there. That's on me. I missed it."
The Angels brought Kole Calhoun in from right field to post a pulled-in, five-man infield in an effort to cut off the potential winning run. It didn't matter. Infante lined Grilli's first pitch into the no-man's land of left field.
"I know he throws a slider for the first pitch and I was waiting for that pitch," Infante said. "Because I saw that the first pitch to Billy [Butler] was a slider, too. In that situation you have to look for a certain pitch, a fastball or a slider, and that's why I made good contact on that pitch."
And the Royals were jumping around Infante on the field, taking the series two games to one. They finished their homestand with a 3-6 record, disappointing after winning 10 of their previous 11 games.
Even so, they finished their first half three games above .500 and 3 1/2 games behind Detroit in the American League Central standings. After 81 of their 162 games, the Royals have a 42-39 record. That's better than the 39-42 of last year and their most halfway wins since a 43-38 mark in 2003.
"It's kind of like we've been both off and on. We play really good and then we go in a little slump," Gordon said. "Hopefully, in the second half, we can be more consistent and continue that from past years."
The 2013 club went 47-34 in the second half and made a spirited if unsuccessful bid for a Wild Card playoff spot.
Sunday's first-half finale included a couple of defensive breakdowns by the Royals, but a crucial play by Gordon as well. Right fielder Lorenzo Cain missed a fly ball in the first inning and first baseman Eric Hosmer made a bad throw in the third, both plays leading to unearned runs.
However, in the sixth, Gordon dug Albert Pujols' leadoff drive out of the left-field corner and nailed him going into second base. Gordon threw quickly to shortstop Alcides Escobar, whose relay to Infante got Pujols stepping -- not sliding -- toward second base.
"You think about the play beforehand so you know the runner," Gordon said. "Nothing against Pujols, but he doesn't run like [Mike] Trout or anything like that, so I knew there was a possibility."
That proved important because later in the inning Aybar banged a home run off Royals starter Jeremy Guthrie to create a 4-4 tie. If Pujols had been on base, the Angels would've taken the lead.
Guthrie pitched into the seventh when reliever Kelvin Herrera rescued him from a bases-loaded jam. Then, Wade Davis and Greg Holland each added a scoreless inning.
The Royals were taking on C.J. Wilson, a left-hander they'd never beaten. A reliever until five years ago, Wilson had a 4-0 record with six saves and a 2.73 ERA in his 16 previous outings (six starts) against them. And his team had won each of the last 14 times he'd faced KC.
However, in the fourth inning the Royals disposed of Wilson with a four-run outburst as they batted around against him.
Cain contributed a two-run double to that inning. That was one of his four hits which included three doubles. Infante had three of the Royals' 11 hits including the dramatic last one.
"It feels wonderful, I'm not going to lie and say no," Royals manager Ned Yost said. "It feels great."
Dick Kaegel is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.