The earliest description of"Psych!" as a slang interjection or exclamation that I've found is from Robert Chapman, New Dictionary of American Slang (1986):
psych ... 5 interj chiefly teenagers An exclamation uttered when one has fooled or deceived another, meaning "I'm only kidding"
Pamela Munro, Slang U. (1989) cites Chapman's entry after giving this definition and example:
Psych! Fooled you! | ""Psych!" I said to Susan after tricking her into missing her final [exam].
Tom Dalzell, Flappers 2 Rappers: American Youth Slang (1996) asserts that the exclamation goes back to the hippie counterculture era of the late 1960s:
Psych! An exclamation used when one has fooled someone else
I have not found this reference book to be especially reliable, however, and the author doesn't provide any examples from the 1960s (or later) to back up the claimed origin period. In this regard, I note that "Psych!" doesn't appear in Harold Wentworth & Stuart Flexner, Dictionary of American Slang, second supplemented edition (1975)—the immediate predecessor of Chapman's New Dictionary of American Slang.
Jonathon Green, Chambers Slang Dictionary (2008), which is quite attentive to dates of first occurrence, gives an origin period of "1980s+":
psych! excl. (also psyche! sike!) {abbr. PSYCH (OUT) ...} {1980s+} (US campus/teen) fooled you! just kidding!
The expression has had fairly impressive staying power, as evidenced by the fact that it appears in Rick Ayers, Berkeley High School Slang Dictionary (2004) as current high school slang at that date:
Psych (SIKE) v., Playing mind games, confusing and dominating the other person. From psychology. Also used as single word expletive, declaring that someone has been tricked. "Did you catch that advertisement?" "Psyche!"
As lbf's answer indicates, the interjection "Psych!" comes from the slang phrase "psych out," meaning (as Chapman's New Dictionary puts it) "To unnerve someone; cause someone to lose composure, will, skill, etc." This meaning, in turn, seems to have arisen from a sense of "psych out" recorded in Harold Wentworth & Stuart Flexner, Dictionary of American Slang, [first] supplemented edition (1967):
psych out 1 To lose control through fear; to lose one's nerve. 1963: "...psyched out {is a} slang term applied to losing one's nerve...." Horst Jarka, "The Language of Skiers," 205. 2 To understand someone; to discover someone's deeper psychological motivations.
In 1960s skiers' slang, "psych out" can describe an undesirable mental process caused by inanimate objects or conditions: "He wanted to complete the downhill run, but he got psyched out by the strong wind and the iciness of the snow." But in later usage, "psych out" is something one person does to another person. In this regard, the second definition given by Wentworth & Flexner is interesting because it suggests a process of seeing through or to the bottom of another person's behavior or thinking—a precondition, one might imagine, for "psyching someone out" in the modern sense of the phrase.