late-14c., "morally discerning, prudent, circumspect, wise or judicious in avoiding mistakes," from Old French discret "discreet, sensible, intelligent, wise," from Latin discretus "separated, distinct," in Medieval Latin "discerning, careful," past participle of discernere "to separate, set apart, divide, distribute; distinguish, perceive," from dis- "off, away" (see dis-) + cernere "distinguish, separate, sift" (from PIE root *krei- "to sieve," thus "discriminate, distinguish").
Meaning "separate, distinct" in English is late 14c. Spellings discrete and nativized discreet co-existed until after c. 1600, when discreet became the common word for "careful, prudent," and discrete was maintained in philosophy, medicine, music and other disciplines that remembered Latin and took some pains to show it. Related: Discreetly.