Kotchman drove the first pitch from Blake Wood (5-1) over the center field fence. He also knocked in the other Tampa Bay run with a run-scoring single that tied it in the seventh.
Rays closer Kyle Farnsworth (4-1) pitched a perfect ninth to earn the win.
Luke Hochevar allowed one run and five hits over seven innings for the Royals. The right-hander, who had won his previous three starts, had seven strikeouts and two walks.
Rays rookie Jeremy Hellickson, 3-0 in four starts during July, gave up one run and six hits in 7 1-3 innings. He struck out seven and walked three.