The holodeck first showed up in an episode of the Animated Series, which is set in the TOS era.
A comment
I saw an interview by Nimoy years later about this episode. He said while both played a large acting part this brief encounter was the only contact they had. At the time, both were fairly unknown, each playing bit parts and didn't know each other as actors. They didn't chat off-camera as they just did the quick camera take, each moving on to their next acting scene.
Nimoy in the interview talked about how a year into the startrack series he and Shatner were talking about past acting projects and found they both did a "Man from Uncle". As they chatted they concluded they both had been in the same episode, but both being unknown actors, and such a brief encounter they had no memory of the meeting.
After viewing the show it was only then they put it all together they had made brief contact, and is looked back as their first acting scene together.