in Homer, etc., the place of darkness between Earth and Hades, from Latin Erebus, from Greek Erebos, which is of unknown origin, perhaps from Semitic (compare Hebrew erebh "sunset, evening"), or from PIE *regw-es- "darkness" (source also of Sanskrit rajas "the atmosphere, thick air, mist, darkness;" Gothic rikwis "darkness"). Used figuratively of darkness from 1590s.
late 14c., "gaping void; empty, immeasurable space," from Old French chaos (14c.) or directly from Latin chaos, from Greek khaos "abyss, that which gapes wide open, that which is vast and empty" (from *khnwos, from PIE root *ghieh- "to yawn, gape, be wide open").
The meaning "utter confusion" (c. 1600) is an extended sense from theological use of chaos in the Vulgate version of "Genesis" (1530s in English) for "the void at the beginning of creation, the confused, formless, elementary state of the universe." The Greek for "disorder" was tarakhē, but the use of chaos here was rooted in Hesiod ("Theogony"), who describes khaos as the primeval emptiness of the Universe, and in Ovid ("Metamorphoses"), who opposes Khaos to Kosmos, "the ordered Universe." Sometimes it was personified as a god, begetter of Erebus and Nyx ("Night").
Meaning "orderless confusion" in human affairs is from c. 1600. Chaos theory in the modern mathematical sense is attested from c. 1977.