The holodeck was somewhat gratuitous, to bridge the TOS era to TNG...
Except the holodeck was actually introduced in TAS' "The Practical Joker."
That was a "recreation room" that appeared to have rather limited capabilities. It looked like it just did scenery as we never saw any characters to interact with in it.
The thing that bugs me, if you're a stickler for canon, is that the holodeck appeared to be a fairly new thing in "Encounter to Farpoint," about 80 years later. Riker and Wesley were both "ooing" and "aahing" about it in that episode.