"The way I work, I always think everything will be fine," Cespedes said. "I believe I'll always get better."
Cespedes, who also singled and scored a run in the fourth, entered Saturday's game with three hits over 34 at-bats. In his last two games, he had three hits in eight at-bats.
"Sometimes all it takes is a couple of hits, and it's off to the races," A's manager Bob Melvin said. "It has looked like, in the previous game, that he's been swinging better, so good timing."
Josh Donaldson, Jed Lowrie and Coco Crisp also drove in runs for the A's, who came from behind in each game against the Royals.
"Having Cespedes in the lineup takes the pressure off everybody around him," Melvin said. "He and Coco are so important to our lineup, even when they're not swinging well."
Jerry Blevins (3-0) threw a scoreless eighth for the win. Hideki Okajima made his Oakland debut with a scoreless seventh. It was his first Major League game in more than two years.
"There was a lot going on in my mind," Okajima said. "All I can say is that it felt good to be on the mound again. I wasn't thinking about the score. I was thinking of everything I built for to come back and pitch in the big leagues."
Sean Doolittle and Grant Balfour were not available to pitch, but Okajima, Blevins and Ryan Cook combined for another top-notch performance out of the bullpen.
Cook pitched the ninth for his first save of the season.
"It doesn't change my approach," Cook said. "Obviously it's the three biggest outs of the game. Once we take the lead you want to shut it down, and we got the job done."
Cespedes hit his home run against Kelvin Herrera (2-4). Seth Smith added two hits for the A's.
"I made the good pitch, but he jumped on the fastball," Herrera said. "I threw it right where I wanted it, down and away, but he just hit it. He's got power, and he made good contact."
A's starter A.J. Griffin, facing Kansas City for the first time, went six innings, giving up three runs on seven hits. He struck out five but walked three -- two of whom scored.
"Walking three guys left a sore taste in my mouth, but the guys kept battling and found a way to get it done," Griffin said. "That shows mental toughness for these guys to overcome my three walks."
Griffin has allowed three or fewer earned runs in all but two starts this season.
"It's a beautiful thing to be a part of," Griffin said. "Cespedes is the kind of guy you put things down to watch what he does. We're a very team-oriented team."