Cain became the seventh Royals player in franchise history to hit three home runs in a game, the last being Kendrys Morales last September at Detroit.
"I had a good night," Cain said, "but at the end of the day, we lost."
He belted an opposite-field homer in the third inning off Yankees starter Masahiro Tanaka, a rarity for Cain, who believes he has only pull power.
"Never hit one [opposite field] before," Cain said. "It's my first oppo bomb."
Could the oppo thump become a pattern now for Cain?
"I don't know," Cain said. "[Batting coach] Dale [Sveum] always tells me I got extra thump in there. It just has to come out. I guess he was right tonight."
Cain then smoked a three-run homer in the fifth inning off Tanaka that put the Royals up, 6-5. Statcast™ projected that home run to have traveled 445 feet from the plate.
Cain wasn't through. He hit another opposite-field homer in the eighth inning off Andrew Miller, giving him five homers on the season.
"I was just thinking middle on him," Cain said of Miller. "I ended up putting a good swing on it, and it got out for me."
Cain has a five-game hitting streak and is 19-for-52 (.365) over his past 12 games, snapping out of an early season slump.
"I just go up there looking to hit the ball hard right now," he said. "If it goes out, that's always nice. At the end of the day, I'm just going up there, trying to hit line drives and put a good swing on it. That's been my approach for a while now."
Jeffrey Flanagan has covered the Royals since 1991, and for MLB.com since 2015. Follow him on Twitter @FlannyMLB. This story was not subject to the approval of Major League Baseball or its clubs.