Old English hol "orifice, hollow place, cave, perforation," from Proto-Germanic *hul (cf. Old Saxon, Old Frisian, Old High German hol, Middle Dutch hool, Old Norse holr, German hohl "hollow," Gothic us-hulon "to hollow out"), from PIE root *kel- (see cell).
As a contemptuous word for "small dingy lodging or abode" it is attested from 1610s. Meaning "a fix, scrape, mess" is from 1760. Obscene slang use for "vulva" is implied from mid-14c. Hole in the wall "small and unpretentious place" is from 1822; to hole up first recorded 1875. To need (something) like a hole in the head, applied to something useless or detrimental, first recorded 1944 in entertainment publications, probably a translation of a Yiddish expression, cf. ich darf es vi a loch in kop.