1570s, Nemesis, "Greek goddess of vengeance, personification of divine wrath," from Greek nemesis "just indignation, righteous anger," literally "distribution" (of what is due), related to nemein "distribute, allot, apportion one's due," from PIE root *nem- "to divide, distribute, allot, to take" (cf. Old English, Gothic niman "to take," German nehmen; see nimble). With a lower-case -n-, in the sense of "retributive justice," attested from 1590s. General sense of "anything by which it seems one must be defeated" is 20c.
In classical mythology, the Greek goddess of vengeance.
Note: By extension, a “nemesis” is an avenger. One's nemesis is that which will bring on one's destruction or downfall.