late 14c., "existing only in imagination, produced by (mental) fantasy," from Old French fantastique (14c.), from Medieval Latin fantasticus, from Late Latin phantasticus "imaginary," from Greek phantastikos "able to imagine," from phantazein "make visible" (middle voice phantazesthai "picture to oneself"); see phantasm. Trivial sense of "wonderful, marvelous" recorded by 1938. Old French had a different adjective form, fantasieus "weird; insane; make-believe." Medieval Latin also used fantasticus as a noun, "a lunatic," and Shakespeare and his contemporaries had it in Italian form fantastico "one who acts ridiculously."
early 14c., "illusory appearance," from Old French fantaisie, phantasie "vision, imagination" (14c.), from Latin phantasia, from Greek phantasia "power of imagination; appearance, image, perception," from phantazesthai "picture to oneself," from phantos "visible," from phainesthai "appear," in late Greek "to imagine, have visions," related to phaos, phōs "light," phainein "to show, to bring to light" (from PIE root *bha- (1) "to shine").
Sense of "whimsical notion, illusion" is pre-1400, followed by that of "fantastic imagination," which is first attested 1530s. Sense of "day-dream based on desires" is from 1926. In early use in English also fantasie, phantasy, etc. As the name of a fiction genre, by 1948.
1835, jocular formation, perhaps based on fantasy.
There is an indescribable complaint, which will never allow a moment's repose to mind or body; which nothing will satisfy—which allows of no beginning, and no ending—which wheels round the mind like the squirrel in its cage, ever moving, but still making no progress. It is called the Fantods. From the diagnostics, we pronounce Lord Brougham incurably diseased with the Fantods. [The Metropolitan, London, October 1835]