Oh, when he was stuck in planet Sarpeidon's ice age thousands of years in the past in "All Our Yesterdays"? Perhaps he was aware of something we aren't as regards the movement of our entire galaxy versus some sort of a fixed frame of reference; the galaxy, and Vulcan within it, might have moved millions of lightyears during those 5,000 years that separated Spock from his native 23rd century.
Or perhaps he was just plain nuts.
In any case, all four eps mentioned above did seem to regard leaving the galaxy a "big deal" in one way or another. In "Where No Man" and "By Any Other Name", the energy barrier is a factor, and is said to damage or destroy ships that attempt passage; in "Beauty", this is ante'd up by the fact that a ship going through may end up hopelessly lost. In fact, "Day of the Dove" is the only one where the sole "threat" made explicit is that of getting really far away from home.
OTOH, the distances involved in getting out of our galaxy need not be all that great - the heroes could shoot out of the upper or lower surfaces of the galactic disk, and those surfaces could be defined by this fictional barrier, perhaps lying much closer to the centerplane (where Earth more or less sits) than the fuzzy, barrierless surfaces in our reality do.
Timo Saloniemi