The date/time markers involved would be:
Spock's arguement with his father ( 18 years prior to Journey To Babel). So that places Spock's enrollment in Starfleet Academy in the year 2250.
Kirk's enrollment in Starfleet Academy in 2251.(presumedly at age 18 if we go by his age in the Deadly Years)
So Spock would have been one year ahead of Kirk. If for some reason Kirk got in at age 17 they would have been in the same class. Perhaps Spock, as a computer expert, was called in as a witness in Kirk's hearing after the Kobayashi Maru test. Alternately as a post graduate Spock may have been asked to design a Kobayashi Maru for Kirk's graduating class and met Kirk when he beat it.
"The Making of Star Trek" says Kirk entered the Academy at age 17, so you appeared to have lined up those two points for the moment.
Going a bit further, "Yesteryear" narrows down Spock's age somewhat. The kahs-wan ordeal is stated as taking place thirty years earlier, when Spock was seven years old (simple math, Spock was 37 at the time of the episode).
With TAS serving as the fourth season, back up two years to "The Deadly Years" and we have Kirk at 34 and Spock ~35.
So, upon further review...Okay, so Kirk and Spock appear to have been at the Academy at the same time, possibly in the same class.
I think it's safe to say that each graduating class has, at least, several thousand cadets. It is entirely possible that they never met, or was at most fleeting, ala Shatner's version. My high school graduating class had around five hundred in it, and I only knew maybe twenty.
Further, Kirk was on the command track, while Spock had no interest in command, so probably not a lot of overlap there. The fact that Spock never took the KM test speaks volumes on that front (and no, the angle that he never took it because he wrote it doesn't work; any decent programmer would run the thing several times himself just to make sure the damn thing works).