The Rays saw their string of three consecutive series wins snapped in the rubber-game loss.
The Rays took a 4-2 lead into the ninth inning. Grant Balfour, Jake McGee and Brad Boxberger had already been used, and Juan Carlos Oviedo was unavailable. So manager Joe Maddon went with normally reliable Joel Peralta to start the ninth.
Jarrod Dyson greeted Peralta with a leadoff single to left. One out later, Eric Hosmer walked, prompting Maddon to bring in Yates to pitch to Salvador Perez.
"He's played and he's closed before," Maddon said. "It was a very tough spot. I mean, I have confidence in the kid. He's got good stuff."
Yates, who had 16 saves and a 0.36 ERA at Triple-A Durham this season, called the situation "very do-able."
"I get a ground ball the game's over, ya know," Yates said.
Yates got ahead 0-1, then he tried to go down and away, but he left the ball up and over the middle of the plate. Perez arched a high shot that came down in the 162 Landing for his 11th homer of the season and a 5-4 lead.
"That's what good hitters do, he didn't miss it," Yates said. "... I knew he hit it pretty good. I was hoping for it to hook foul. I didn't think he hit it that far, but he hit it pretty good. Just one of those things where hopefully I come to the ballpark the next day and forget about it."
Perez stood at home plate thinking the ball would go foul.
"I saw the ball first and saw the left fielder [Brandon Guyer] just keep running and running," Perez said. "I thought he might catch it, maybe not. As soon as the ball hit the other side, it was good for us."
Yates allowed that the loss "stings a little bit."
"It's a game we should have won," Yates said. "We needed to win. Every win is kind of crucial right now. Obviously it doesn't feel good to be in that situation and let your team down."
Royals closer Greg Holland pitched a 1-2-3 ninth for his 24th save of the season.
Yordano Ventura started for the Royals and lit up the radar gun like usual, hitting triple digits on several occasions. Back in April, the right-hander blanked the Rays for six innings before coming away with a no-decision. This time, the Rays began to chip away at him in the fourth.
Evan Longoria singled to lead off the inning and James Loney walked before Guyer and Sean Rodriguez lined out. Jose Molina drew a walk to load the bases, bringing Kevin Kiermaier to the plate.
With visions of 100 and 101 mph dancing in his head, Kiermaier opted to jump on an 89-mph changeup, re-routing the pitch into the right-field stands for his eighth home run of the season and the first grand slam of his career to give the Rays a 4-2 lead.
Kiermaier became the first Rays rookie with four hits and a grand slam in the same game.
"Feels good, but at the end of the day, that was a tough ninth inning and just puts a damper on everything," Kiermaier said. "It's not about me, it's about the team."
Rays starter Alex Cobb struck out the first two hitters of the game on six pitches. Eric Hosmer then stepped to the plate and planted the seventh pitch of the game into the right-field stands for a 1-0 lead.
Hosmer's homer came on the first pitch he saw from Cobb since hitting the fateful ball that struck the right-hander in the head last season.
Kansas City's offense got busy again in the fourth when they loaded the bases with no outs. But Cobb navigated the crisis well, allowing just one run to score when Raul Ibanez grounded out to first.
While the Royals took charge of the game in the ninth, the Rays missed numerous opportunities, leaving 11 runners on base and going just 1-for-9 with runners in scoring position.
"We left a lot of chicken on the bone," Maddon said. "And you just can't do that kind of stuff."
The Rays have an off-day on Thursday before finishing out the first half with a three-game series against the Blue Jays starting on Friday at Tropicana Field.
"I think the off-day is coming at the perfect time," Maddon said. "We can put it in the disposal and come back out on Friday, and play well over the weekend. We've been playing great. It was an unfortunate night, it did not play for us."