I don't think that yikes as an exclamation has any direct connection to yoicks or hoicks, or with yike (the cry of the green woodpecker of Britain and continental Europe, recorded starting in the late 1800s), or with the baby-talk word yikes meaning "likes" and popular in the late 1800s and early 1900s)—or for that matter with yikes in the eighteenth-century Polish/Yiddish sense of "family and academic background" or with Yike in the sense of a traditional Siamese theatrical performance described by nineteenth-century travelers.
Rather, I think that yikes emerged in the United States as a variant of the slightly older word yipes, which itself may have arisen in connection with "yip" and "yipe"—sounds that a dog makes. Though my view on this question is by no means incontestable, I base it on some circumstantial considerations that at least seem consistent with such a derivation.
Early 'yikes'
The strongest case I can make for the modern term yikes as a lineal descendant of yoicks—a call to one's hounds during a hunt—is that the two words appear together in Harry Hieover, Stable Talk and Table Talk, or Spectacles for Young Sportsmen (London, 1845):
We will suppose a fox-hunter is to come on : let me see if I can come at all near the thing by description. First, we hear the cracking of a whip in the side-scenes, quite as loud and continued, but not half as well done as that of a postilion's arriving from Marseilles or any other Continental town : then we are treated with sundry yoyks, or yikes, or yohikes, or some such unheard-of, and let us hope never-to-be-heard-again, sounds.
But that's the last we hear of any similar exclamation in Google Books results until 1903, where yike arises as a response to a U.S. Army roll-call in Hamilton Higday, "A Day in the Regular Army," in The World's Work (New York, January 1903):
The roll-call proceeded:
Private Allen!"—"Yer-r-r!"
“An'ers'n!"—"Yike!"
"Beale!"—"Yhope!"
“Brown!"—“Yow!"
And so on down the alphabet.
But neither the English fox-hunt yikes from 1845 nor the American roll-call yike from 1903 seems to have inspired any similar expressions in the Google Book database in the decades immediately following their appearance. In fact, the next slang use of yike to appear in the results appears in a 1943 issue of American Speech in the context of Australian slang used to describe a ticket scalper outside a sporting event who initially suspects that two ordinary citizens are plainclothes policemen [combined snippets]:
"I'm dropping briefs at the yike and someone drums me there's two Jacks on me hammer. I palm the briefs and front 'em and I'm a quick jerry they ain't john hops. When I tail 'em and cockatoo 'em buyin' their ducats for the yike, I know I'm sweet— Jacks never pay for nothin'."
Here yike seems to refer to the game or sporting event or (perhaps) prize fight at which the scalper is trying to resell his "briefs" (tickets). I found only one other instance of Australian slang usage of yike, in Thomas Hungerford, Riverslake (1953); the meaning there seems to be a fight or tussle.
'Yikes' in the modern sense
Google Books search results show a number of matches for yikes beginning in the late 1940s. The first of these is from a 1947 U.S. Army pamphlet that appears to be an updated version of "Army Editors' Manual" (1943), a guide to writing and editing news stories for Army publications [combined snippets]:
Among these variations are the STACCATO lead, the CARTRIDGE lead, the PUNCH lead, the OPINIONATED lead, and the CROWDED lead. The STACCATO, rarely used with justification, is more of a feature lead than a news lead. It consists of one or more single word "sentences" followed by a few short multiword sentences.
Zowie! Yike! Pvt. Eddie Johnson just could not believe it. Was he lucky? Yeah, man! Eddie, back from a 3-day pass, is telling everyone in Company B about it. On the pass, he went to New York City, wandered into Radio City Music Hall, found himself in a studio and on the air. Professor Quiz asked a few questions. Eddie answered them. He collected 50 dollars.
A flurry of matches for yikes occurs in the period from 1949 to 1951, in the unmistakably modern sense of "wow," "zowie," or "uh-oh." From Robert A. Heinlein, The Man Who Sold the Moon (written in 1949 but published in 1951, according to Wikipedia):
"I thought you had snake venom in it."
"So I have. I'll rinse it out."
"Yikes, woman! Don't you care what chances you take with yourself?—or with me?"
"Pooh—snake venom wouldn't hurt you even if you did drink it—unless that rotgut you drink has given your stomach ulcers. Soup's on!"
From Ellery Queen, Double, Double: A New Novel of Wrightsville (1950) [snippet]:
"...habits of the Crimson undergraduate for the American Weekly. Why this flowering-of-New-England getup?"
"Yikes, the fellow undoes me. Would you really like to know?"
"We have the evening before us."
From May Wallace, A Race for Bill (1951):
"Yikes, I didn't know how tired and hungry I was," he sighed, as he slumped into a chair opposite Rosemary at the small porcelain table.
"Mommy says Criminetalies instead of Yikes," Rosemary volunteered through a mouthful of chocolate pudding.
And from Robert A. Heinlein (again), Between Planets (1951) [combined snippets]:
"Why didn't you say so?" grumbled the soldier doing the checking. He turned and produced another list: "Hannegan ... Hardecker ... here it is. Harvey, Donald J. — Yikes! Wait a minute—it's flagged. Hey, sarge! This bird has a polit flag against his name."
As these examples suggest, yikes showed up in print through the backdoor of literature—science fiction, murder mysteries, and kid fiction (A Race for Bill is a soapbox derby novel). By 1953, yikes had also appeared in two books from the Happy Hollisters series and in Boys' Life magazine.
The 'yipes' connection
So far I've focused on yike and yikes, and on the emergence of yikes in its modern exclamatory sense in the late 1940s. But there is an obvious precedent for yikes in the word yipes—used in precisely the same way as yikes but beginning approximately a decade earlier. From Good Housekeeping, volume 113 (1941):
"...What do you say?"
Eddie had lots to say, but "Yipes!" was all that came out.
"All right!" said Terry. "But there's one condition — "
"What is it?" asked Eddie breathlessly.
"You've got to go to college this fall."
From The Saturday Evening Post, volume 216 (1943):
Listening to Johnston talk about the men he flew with, it is easy to see why they grew impatient with the initial program mapped out for them. His squadron commander, Bob Puckett, was always tugging at his scraggly mustache and remarking, "Yipes, that is so," when anyone came up with a suggestion that pleased him.
From Western Aerospace, volume 23 (1943):
and then into "Had your bananas today?" For a time it became "Had your meat today?" but this we never quite understood.
Now, however, the joke has turned into its final and ultimately horrible form. "Had your questionnaire today?" Yipes! If all the Bureaus who send out questionnaires to people were laid end to end it would be a very good thing.
From Marine News, volume 31 (1944) [combined snippets]:
Its a bird ... it's a plane ... yipes it's "Joe"
And from Phantom Lady, volume 13 (1947) [a comic book]:
"YIPES! SHE ALMOST KILLED THAT KID!"
"YAAA! HEY! WATCH WHERE YER GOIN'!"
Possible sources of 'yipes' and 'yiping'
So where did yipes come from? One plausible source is dog sounds. From Katherine Milhous, Herodia: The Lovely Puppet (1942):
Something began to clop across the stage, something small and spotted. It had trouble with its feet and it seemed not to see where it was going because of its ears getting in the way. Giving up the struggle, it sat down, and with nose pointed upward, split the air with loud yipes.
"Dawgie," cried a very small boy down in front. "Look, Mamma—dawgie! "
From Coulton Waugh, The Comics (1947):
There have been some great comic dogs: Orphan Annie's big Sandy, all of Edwina's (hers the most truthful); Pluto; Gorgon, Barnaby's talking "pooch" who tells Shaggy Dog Stories—and many more. Above the "yips" and "yipes" and "arfs" of the comic kennels, however, one deep, great voice lets out an occasional authoritative roar; one huge head towers up, mounted on a long, scraggy neck. True, this giant "pooch" is not widely syndicated, compared with certain of the others, but the deep devotion of his fan-millions compensate and proclaim him king of comic canines. He is Napoleon.
A Google Books search for yipe turns up some considerably older matches. From G.E. Foster, "The Tail of a Dog," in The [Anamosa, Iowa] Reformatory Press (October 3, 1908):
Briggs was speeding across country in an automobile. Cynthia sat at his side. Behind them came old man Haddon in an airship. Would the elopers be able to reach a minister before the airship could reach them?——
"Bow-ow! Wow! Yipe! Yipe! Ow-o-o!"
Mr. Briggs sat up in bed, rubbed the last traces of the dream from his eyes and aid, "What the blazes?"
"Bow-ow! Woo-o-o!"
It was the dog.
From The Western Honey Bee, volume 2 (1914):
It is a poor dog that won't yipe when his tail is trod on—and he don 't always stop to look where he is going to land when he jumps.—Editor.
From The Editor & Publisher and The Journalist (December 18, 1915):
YIPE! YIPE!! YIPE!!!
The coupon men have spoken. This comic opera composition will be torn to shreds in next week's issue of The Editor and Publisher.
From P.G. Wodehouse, "Piccadilly Jim," in The Saturday Evening Post (November 11, 1916):
Then another voice interrupted him.
"Yipe! Yipe! Yipe!”
Through the opening the dog Aida, rejoicing in the removal of the obstacle, raced like a fur muff mysteriously endowed with legs and a tongue. She tore across the room to where Gentleman Jack's ankles waited invitingly. Ever since their first meeting she had wanted a fair chance at those ankles, but someone had always prevented her.
This usage may have led to the attribution of metaphorical yiping to human beings. For example, from Joel Blanc, "Firm of Henderson & Son," in National Hardware Bulletin (November 1913):
"...So I said to Ed. that he ought to have screw anchors. Ed. didn't know a screw anchor from a balloon anchor, and he said he didn't believe that the hardware man did.
"Well, that lam at our biz made me yipe and offer to put down a bet for the torches. Ed. took me, and it was agreed that he should do all the talking."
And from George Somerville, The Boardwalk Love Letters of Hiram and Ella (1915):
I've been awful lonely here without you, Ella, notwithstandin' the ocean, and folks, and Bill's pressin' affairs; and I'll be plumb dippy when the brakie yipes out “Ronk!”
I'll be nigh home then.
And from "Mexico and Intervention," in American Blacksmith Auto & Tractor Shop (February 1920):
The present head of things in Mexico—Don Venustiano Carranza also, "First Chief" as he has vainly styled himself is one of those unfortunate individuals whose bump of conceit is abnormally developed and is a man who delights to pose and threaten and yipe around generally at the skirts of everybody for fear he will not be noticed.
And from The Garment Worker: Official Journal of the United Garment Worker of America (October 14, 1921):
The amusing part of the whole feature is that even in our own good little community a number of jack-snips rose up, figuratively speaking, on their hind legs so they might be seen and heard and said, yipe! yipe! We, too; it's about organized labor and we endorse it. Poor chamber of comics.—El Paso Labor Advocate.
Unlikely alternative derivations
But there are other possibilities as well.
From Max Schoen, "Music and Educational Tendencies of the Day," in Education (November 1917):
In the first half [of a Mahler symphony] there were several unexpected and entertaining "yipes" in marvelous unison by the previously silent chorus. These "yipes" I thoroughly enjoyed, but with that exception the Mahler Symphony was as meaningless and void to me as a futurist painting.
The source of yipes here might be dog sounds, but it might just be the onomatopoeic sound that the author thought that the chorus made.
From Fred McMullen & Jack Evans, Out of the Jaws of Hunland: The Stories of Corporal Fred McMullen, Sniper, Private Jack Evans, Bomber, Canadian Soldiers (1918):
We went in the line there [at the Ypres salient] into the "International" Trench near St. Eloi, relieving the Queens West Surreys and a bunch from Sussex. They called it "Yeeps." Behind the line we met some Belgians who called it "Yipes," but never a "Wipers" did we hear.
This episode of "Yipes" for "Ypres" seems unrelated to anything else in the Google Books results.
From Kay Boyle, My Next Bride (1934) [combined snippets]:
Around they went with him, with Estelle's laughter held and shaken clear as water on her tongue. Around they went, with Sorrel crying soft, breathless yipes of laughter, his short skirt flying, and the Frenchman's jowls went dark with the pleasure of his blood.
Again the yipes might resemble the yipping of dogs or they might be imitative of the laughing sounds themselves.
Conclusions
From the Google Books results I looked at, it seems most likely (though by no mean certain) that the modern exclamation yikes arose during the late 1940s as a variant of yipes, which had gained some popularity as an exclamation during the preceding decade, and which had in turn probably arisen from the earlier yipe—an onomatopoeic spelling of a dog's nervous or pained yelp, in use from the first decade of the twentieth century.