From Middle High German garst, from Old High German garst (“foul taste”), of uncertain origin. Compare German garstig.
goaschtig