c. 1400, "unlucky, inauspicious," in dismal day, earlier as a noun, in the dismal (c. 1300) "in days of misfortune or disaster, under inauspicious circumstances, at an unlucky time," from Anglo-French dismal (mid-13c.), apparently from Old French (li) dis mals "(the) bad days," from Medieval Latin dies mali "evil or unlucky days" (also called dies Ægyptiaci), from Latin dies "days" (from PIE root *dyeu- "to shine") + mali, plural of malus "bad" (from PIE root *mel- (3) "false, bad, wrong").
Through the Middle Ages, calendars marked as unlucky two days of each month (Jan. 1, 25; Feb. 4, 26; March 1, 28; April 10, 20; May 3, 25; June 10, 16; July 13, 22; Aug. 1, 30; Sept. 3, 21; Oct. 3, 22; Nov. 5, 28; Dec. 7, 22), supposedly based on the ancient calculations of Egyptian astrologers.
By 1580s the English word had been extended to "gloomy, dreary, cheerless," and was used to describe physical surroundings, sounds, or anything else felt as tending to depress the spirits. In North America, it was the name given along the seacoast and sounds around North Carolina to tracts of swampy land and dead trees (1763). The dismal science (1849) was Carlyle's name for "political economics." Related: Dismally.