This is their third (or actually fourth and fifth) encounter with the barrier, even if it's a fleeting one - they get out, and then get back in, and there's no doing that unless they go through the barrier both ways!
But whether that purple swirl is the barrier... Nope, the dialogue excludes that possibility. Or, rather, Spock thinks they are far outside the galaxy, in the intergalactic void, but he could be wrong, as he admits to having no way of knowing where they really are, and by sheer (and slim) chance they might be inside the barrier.
As for the visuals, they are similar - but they are not identical. It's no recycled footage from "Where No Man", it's an all-new effect. And of course TOS-R does an even more dissimilar effect there, removing any visual connection.
Timo Saloniemi
I thought the original version of "Beauty" did re-use some fx footage from WNMHGB. Am I just thinking of "By Any Other Name"? My DVDs are TOS-R, so I can't check it out.