From Middle English gastnes, gastnesse, from gast, past participle of gasten ("to terrify"), equivalent to ghast + -ness.