I think Kirk got the general idea that there was a long-term relationship between them from the background chatter in Spock's mind (all those echoes). Spock was probably trying to filter out most of that so he didn't hit an unprepared Kirk with the totality of a long lifetime, plus they needed to focus on the information he was trying to convey right then, but all the rest of it was ambient, and Kirk is sharp and attuned enough to pick it up.
The mind meld was probably the most important event to convince Kirk that Spock didn't hate him. And later, Spock tells young Spock to stick it out in Starfleet. So he was really a prime mover in getting their relationship to develop in this universe.