Salvador Perez hit a three-run homer in yet another big first inning against Michael Pineda, and the slumping Royals rebounded to beat the Yankees 7-3 Wednesday night.
Down by four runs six batters in, New York clawed back to 4-3 against Yordano Ventura before Lorenzo Cain hit a two-run single in the sixth against reliever Nick Goody.
Kendrys Morales added a solo homer in the seventh off Phil Coke as the Royals won for just the fourth time in their past 15 games.
After winning the opening two games of the four-game series, the Yankees were hoping to string together three straight victories for the first time since Sept. 1-4. They are 0-5 this year when attempting to win a third consecutive game.
Ventura (3-2), coming off losses at Seattle and Cleveland, gave up three runs and six hits in six innings.
Danny Duffy, Kelvin Herrera and Wade Davis followed with scoreless relief.
The World Series champions, just 16-17 this season, were boosted when Perez pulled a hanging slider for his fifth home run this season, a drive that came one day after his 26th birthday.
Winless in his past six starts, Pineda (1-4) has fallen behind early and often. He has a 15.43 ERA in the first inning this season, allowing 12 runs and 19 hits — five of them homers — in 38 at-bats. After the first, his ERA is 4.26.
Six of the first seven Royals reached, interrupted only by Alex Gordon's sacrifice fly. Pineda settled down and left after a career-high 114 pitches with a 4-3 deficit. Goody hit Alcides Escobar on the back with a pitch, then allowed a two-run single to Cain, who had three homers and five RBIs in Tuesday's 10-7 loss.
Kansas City had been 0 for 13 this year with the bases loaded.
Pineda gave up six runs in 5 2/3 innings and walked four, his most since 2011. He needed 36 pitches to get through the first, when Eric Hosmer hit a key grounder that went under Dustin Ackley at first and into right field that put two on with one out.
New York was 1 for 13 with runners in scoring position. The Yankees have scored just 11 runs during Pineda's winless streak.
Carlos Beltran's 399th home run, his third in three days, started New York's comeback attempt in the second, when Chase Headley hit an RBI single. Starlin Castro, who hasn't driven in a run since April 27, hit into an inning-ending forceout with the bases loaded.
Rookie Ben Gamel stranded a runner on third in the fourth, and the Yankees got just one run in the fifth after Castro's double put runners at second and third with no outs. Brian McCann hit an RBI grounder, but Beltran and Ackley grounded out.
Yankees center fielder Jacoby Ellsbury (hip), first baseman Mark Teixeira (neck) and designated hitter Alex Rodriguez (hamstring) once again sat out; because of the injuries, Aaron Hicks, Ackley and Gamel started for the second straight day.
In addition to Escobar getting hit by Goody, Cain (knee) and Alex Gordon (elbow) were plunked by Pineda. Davis hit Brett Gardner on a thigh with two outs in the ninth.
Royals: Royals manager Ned Yost said he had not yet received results of the MRI of RHP Chris Young's right forearm.
Yankees: LHP CC Sabathia (strained left groin) will throw a bullpen session this week and anticipates he will be activated from the DL as soon as May 20, the first day he is eligible. ... Manager Joe Girardi said Rodriguez (strained right hamstring) also could be reinstated the first day he is eligible, on May 19. ... Girardi said Ellsbury might play this weekend.
Nathan Eovaldi (2-2) is scheduled to start for the Yankees in Thursday's series finale and former Yankee Ian Kennedy (4-2) is slated to pitch for the Royals. Kennedy is among the AL leaders in ERA (2.13) and opponents' batting average (.209). Eovaldi's average four-seam fastball velocity of 97.7 mph is the highest among big league starting pitchers this year, according to Baseball Prospectus' PITCH f/x data.