The salute first appeared in the 1967 episode "Amok Time," in which Spock (Leonard Nimoy) must return to his home planet to get laid or die trying. From there, the greeting just took off, presumably because the hippies mistook it for some sort of uber-peace sign.
But It Was Almost ...
A shoulder rub, basically. The script for "Amok Time" actually called for Spock to kneel in front of another Vulcan, who would then grab his shoulders. That was the "Vulcan salute." Basically, Vulcans were supposed to be an entire race of Buster Bluths from Arrested Development, constantly saying hi to their brethren through awkward surprise massages.
It's hard to imagine this version becoming so widespread and iconic, especially considering that sci-fi fans in general are about as comfortable with human contact as Vulcans themselves.
Nimoy, however, was aware of this: He pointed out on the set that a previous episode had established that Vulcans would think of this as an invasion of privacy, so he suggested replacing the shoulder rub with something else.
"You think someone's gonna remember what we said in another episode? Come on."
And as it turns out, the gesture has nothing to do with trying to appeal to the hippies and everything to do with Nimoy being Jewish. Nimoy remembered an event in his childhood when he was in a synagogue and saw Jewish priests blessing the audience by doing a gesture with both hands to represent the Hebrew letter "shin," which means "lord" or "eternal spirit":
Both of which are Leonard Nimoy's nicknames.