c. 1200, "mild, well-mannered," Old English gedæfte "gentle, becoming," from Proto-Germanic *gadaftjaz (source also of Old English daeftan "to put in order, arrange," gedafen "suitable;" Gothic gadaban "to be fit"), from *dab-, which has no certain IE etymology and is perhaps a substratum word.
Sense deteriorated to "dull, awkward, uncouth, boorish" (c. 1300), perhaps via the notion of "humble." Further evolution to "foolish, simple, stupid" (mid-15c.) and "crazy" (1530s) probably was influenced by analogy with daffe "halfwit, fool, idiot" (see daffy); the whole group probably has a common origin. For sense evolution, compare nice, silly. Related: Daftly; daftness.