The modern sense dates only from the 1930s. Earlier senses, from the 14th century, focused on the notion of "fantasy". At first, it referred to things "existing only in the imagination", as when Bolingbroke talks of "thinking on fantastic summer's heat" (Richard II, I.iii.299). Then it was applied to what was imaginative or fanciful (Ophelia's "fantastic garlands", Hamlet, IV.vii.168), or to people who behaved in an extravagant way. "To be fantastic may become a youth," says Julia to Lucetta (Two Gentlemen of Verona, II.vii.47). It is a short step from here to "dressed in a fanciful way". When we see Lucio in the character-list of Measure for Measure described as "a Fantastic", it means he is a showy dresser. The "fanciful" sense is also in the adverb use: "Enter Lear fantastically dressed with wild flowers" (King Lear, IV.vi.80). The line is not an accolade about Lear's costume: the gloss is "grotesquely".
David Crystal is author, with Ben Crystal, of Shakespeare's Words, published by Penguin