Daniel Cassidy, in his insane book, How The Irish Invented Slang, claims that the English slang terms goof and goofy derive from Irish gáifeach, which according to Cassidy means ‘exaggerated, given to wild exaggeration, flamboyant, ostentatious, loud, loud-mouthed, querulous.’ This is pronounced guy-fah or gaw-fah depending on the dialect. This is an adjective. There is no noun gáif (the adjective comes from gábh, which means danger), so it is hard to explain where the basic word goof would come from if Cassidy were right (which he isn’t).
According to the most reliable Irish dictionary, Ó Dónaill, gáifeach is defined as ‘1a dangerous, terrible 1b (of sound) wild, loud, fierce 2a exaggerated, sensational, given to exaggeration 2b flamboyant, ostentatious’.
None of which really fit the bill of what goofy means, which is ‘foolish or harmlessly eccentric.’ Meanwhile, back in the real world, far from the caisleán óir where Cassidy composed his delusional book, goof comes from an English dialect term goff, which in turn comes from the Middle French goffe meaning awkward or stupid.