Middle English derk, later dark, from Old English deorc "without light, lacking light or brightness (especially at night), obscure, gloomy;" figuratively "sad, cheerless; sinister, wicked," from Proto-Germanic *derkaz (source also of Old High German tarchanjan "to hide, conceal"), which is of uncertain etymology. For vowel change, see marsh.
Application to colors, "not radiating or reflecting much light," is from late 14c. Of complexion, "not fair," from early 14c. Figurative sense of "obscure, not easily understood" is from early 13c.; that of "sullen, sad" is from 1590s. Meaning "concealed, secret" is from late 14c. Dark Continent "Africa" (1828) combines several figurative senses (earliest references are in missionary publications). Theater slang for "closed" is from 1916.
Dark Ages "benighted time in history, period of ignorance" is attested by 1739; the specific focus on the centuries of the early Middle Ages in Europe, from the fall of Rome to the revival of secular literature, is from 1830s, from dark in a sense of "characterized by ignorance, backward in learning, void of intellectual light" (late 14c.).
Dark horse "competitor for honors or office about whom nothing certain is known, or whose identity is at first concealed," especially, in U.S., politics, "one who is unexpectedly brought forward as a candidate in a convention," 1842, is an image from horse racing, of horses whose performances or capabilities are not generally known, in which dark is used in its figurative sense of "unknown."
Moonraker is called a "dark horse"; that is neither his sire nor dam is known. ["Pierce Egan's Book of Sports," London, 1832]