KANSAS CITY, Mo. -- CC Sabathia had been struggling in his previous four starts by pitching to a 9.58 ERA.
It was the Kansas City Royals, however, who were struggling to hit Sabathia on Tuesday night.
Sabathia (3-2) quieted the Royals offense, while Sanchez and Carter supplied loud swings.
"I've seen him struggle before and he turns it around," Yankees manager Joe Girardi said. "There have been a lot of years he's had a really rough April and he turns it around in May and continues."
Sabathia had a 1.47 ERA in his first three starts before hitting the rough patch.
"I don't think what he did early on was a fluke," Girardi said. "I think about the first few games and he was the reason we won a couple of those games when we were struggling. He just needs to get his cutter back on track and he'll be OK. It's a huge pitch for him."
The cutter cut down the Royals in the opener of this three-game series after being among the reasons for Sabathia's struggles.
"The cutter was a lot better today," Sabathia said. "And the guys played great defense behind me. We figured out by the second inning they were coming out hacking. We just had to make some pitches on the edges and get some quick outs."
Sanchez belted a three-run homer in the third, while Carter hit a two-run shot in the fourth. Both were off Jason Hammel, who is 1-5 with a 6.20 ERA in eight starts.
Sabathia lowered his ERA to 4.93. He yielded five hits, four of them singles, walked two and struck out four.
"Back in the day, he was really good," Royals catcher Salvador Perez said. "He can still do it. It was his night."
The Royals threatened in the seventh, which Eric Hosmer led off with a bloop double. After Sabathia struck out Perez and Jorge Bonifacio, Jorge Soler coaxed a walk and Alex Gordon reached on an infield single to load the bases.
Girardi went to his bullpen, although Sabathia had thrown only 85 pitches. Tyler Clippard struck out Whit Merrifield to end the inning, stranding the runners.
They tacked on another run in the eighth when Matt Holliday's fielder's choice grounder with the bases loaded scored Gregorius.
The Royals loaded the bases in the ninth on Bonifacio and Gordon singles sandwiched around a walk to Soler. Merrifield's fielder's choice grounder got Bonifacio home to prevent a shutout.
The Yankees (23-13) remain atop the American League East standings. The Royals (16-22), who had their four-game winning streak snapped, are at the bottom of the AL Central.
The Royals are 6-2 in their past eight games with Hammel losing both.
Hammel allowed two harmless singles to the Yankees in the first two innings. Hammel has a 1.69 ERA in the first two innings of his eight starts, allowing three runs over 16 innings.
After the second inning, Hammel's ERA climbs to the north side of eight.
Before Hammel could retire a Yankee in the third, Carter singled, Brett Gardner walked and Sanchez hit a three-run homer to straight away center on a 0-1 pitch.
After retiring the first two batters in the fourth inning, Gregorius singled and Carter homered, making it 5-0. Carter picked on a 1-1 Hammel offering and deposited it over the center-field wall.
"I've got to do a better job of keeping the ball in the park," Hammel said. "I had some outstanding defense behind me or it could have been a lot worse if you think about it.
Both the guys that hit it out are strong boys. They are mistake killers. They got a couple and did what they are supposed to.
The Royals offense managed just three singles and no runs off Sabathia in the first five innings.
"We had eight hits, not a great night offensively," Royals manager Ned Yost said. "We had guys hit the ball on the nose and not much to show for it."
NOTES: INF Christian Colon and OF-1B Peter O'Brien, who were designated for assignment by the Royals, have been claimed on waivers. The Miami Marlins picked up Colon, while the Cincinnati Reds acquired O'Brien. ... Royals RHP Ian Kennedy, who is on the disabled list with a hamstring strain, will throw a bullpen Wednesday. Manager Ned Yost hinted Kennedy could start Saturday at Minnesota if all goes well. ... LHP CC Sabathia moved past Mike Mussina to 13th place on the Yankees' all-time list innings list with 1,554 2/3. He also picked up his 109th Yankees' victory, tying Spud Chandler and Fritz Peterson for 15th place on the club's all-time win list. ... Yankees RHP Michael Pineda and Royals LHP Jason Vargas are the probable pitchers Wednesday. Vargas' 1.01 ERA is the lowest in the majors.