"quadruped of the genus Canis," Old English docga, a late, rare word, used in at least one Middle English source in reference specifically to a powerful breed of canine; other early Middle English uses tend to be depreciatory or abusive. Its origin remains one of the great mysteries of English etymology.
The word forced out Old English hund (the general Germanic and Indo-European word, from root from PIE root *kwon-) by 16c. and subsequently was picked up in many continental languages (French dogue (16c.), Danish dogge, German Dogge (16c.). The common Spanish word for "dog," perro, also is a mystery word of unknown origin, perhaps from Iberian. A group of Slavic "dog" words (Old Church Slavonic pisu, Polish pies, Serbo-Croatian pas) likewise is of unknown origin.
In reference to persons, by c. 1200 in abuse or contempt as "a mean, worthless fellow, currish, sneaking scoundrel." Playfully abusive sense of "rakish man," especially if young, "a sport, a gallant" is from 1610s. Slang meaning "ugly woman" is from 1930s; that of "sexually aggressive man" is from 1950s.
Many expressions — a dog's life (c. 1600), go to the dogs (1610s), dog-cheap (1520s), etc. — reflect the earlier hard use of the animals as hunting accessories, not pets. In ancient times, "the dog" was the worst throw in dice (attested in Greek, Latin, and Sanskrit, where the word for "the lucky player" was literally "the dog-killer"), which plausibly explains the Greek word for "danger," kindynos, which appears to be "play the dog" (but Beekes is against this).
Notwithstanding, as a dog hath a day, so may I perchance have time to declare it in deeds. [Princess Elizabeth, 1550]
Meaning "something poor or mediocre, a failure" is by 1936 in U.S. slang. From late 14c. as the name for a heavy metal clamp of some kind. Dog's age "a long time" is by 1836. Adjectival phrase dog-eat-dog "ruthlessly competitive" is by 1850s. Phrase put on the dog "get dressed up" (1934) may be from comparison of dog collars to the stiff stand-up shirt collars that in the 1890s were the height of male fashion (and were known as dog-collars from at least 1883).
And Caesar's spirit, ranging for revenge,
With Ate by his side come hot from Hell,
Shall in these confines with a monarch's voice
Cry Havoc! and let slip the dogs of war;
[Shakespeare, "Julius Caesar"]
also gas-light, "light, or a provision for light, produced by combustion of coal gas; a gas-jet," 1808, from (illuminating) gas (n.1) + light (n.). Used through the 19th and into the early 20th century as street and domestic lighting. Related: Gas-lighted; gas-lighting; gaslighting.
As a verb meaning "to deliberately make a person believe that they are insane," by 1961, perhaps 1956. This sense is from the 1944 film Gaslight, in which a 19th century woman (played by Ingrid Bergman, who won an Academy Award) appears to be going mad. It is later revealed that her criminal husband has been convincing her that she is insane in order to discredit her observations of his activities. Among the observable clues has been the dimming of their home's gaslighting whenever (as she later learns) the husband goes secretly into the attic: he has convinced her that she is imagining this, until a family friend sees it, too, which confirms the clue that uncovers the crime.
Brian: Tell me. Is there anyone else in the house now, except us and Elizabeth?
Paula: No. Why?
Brian: The gas just went down.
Paula: You saw that too!
Brian: Why, yes.
Paula: Oh, then it really happens! I thought I imagined it!
Brian: But all it means is someone else has turned it on.
Paula: Oh, no, no. I thought that too. But every night, I’ve been all over the house, there’s never been another light turned on. At last I can tell this to someone! Every night when my husband goes out…
Brian: …The light goes down?
Brian: And then what?
Paula: Well, then, I think I hear things. I watch and wait. Later on, the gas goes up again.
Brian: And he comes back?
Paula: Yes. Quite soon after. Always quite soon after.
The word seems to have received a boost in feminist literature in late 1970s.
… I had been told that my tonsillectomy was “not that bad” or that the dentist whose hands were between my legs was “fixing my teeth,” … My own favorite embodiment of this horror, still enjoyed by late-show insomniacs, is the 1944 film Gaslight, a tale which so impressed the public imagination that even today the word “gaslight” is used to describe an attempt to destroy another’s perceptions of reality and, ultimately, sanity itself. [Florence Rush, "The Best Kept Secret: Sexual Abuse of Children," 1980]
The sense evolved by 2016 to also mean "dismiss or discredit someone's viewpoint."
c. 1300, "inadequate, unsatisfactory, worthless; unfortunate;" late 14c., "wicked, evil, vicious; counterfeit;" from 13c. in surnames (William Badde, Petri Badde, Asketinus Baddecheese, Rads Badinteheved). Rare before 1400, and evil was more common until c. 1700 as the ordinary antithesis of good. It has no apparent relatives in other languages.* It is possibly from Old English derogatory term bæddel and its diminutive bædling "effeminate man, hermaphrodite, pederast," which probably are related to bædan "to defile."
The orig. word, AS. bæddel, ME. baddel, on account of its sinister import, is scarcely found in literature, but, like other words of similar sense, it prob. flourished in vulgar speech as an indefinite term of abuse, and at length, divested of its original meaning, emerged in literary use as a mere adj., badde, equiv. to the older evil. [Century Dictionary, 1897]
Comparable words in the other Indo-European languages tend to have grown from descriptions of specific qualities, such as "ugly," "defective," "weak," "faithless," "impudent," "crooked," "filthy" (such as Greek kakos, probably from the word for "excrement;" Russian plochoj, related to Old Church Slavonic plachu "wavering, timid;" Persian gast, Old Persian gasta-, related to gand "stench;" German schlecht, originally "level, straight, smooth," whence "simple, ordinary," then "bad").
Comparative and superlative forms badder, baddest were common 14c.-18c. and used as recently as Defoe (but not by Shakespeare), but yielded to comparative worse and superlative worst (which had belonged to evil and ill).
The meaning "uncomfortable, sorry" is 1839, American English colloquial. To go bad "putrefy" is from 1884. Not bad "fairly good" is by 1771. Ironic use as a word of approval is said to be at least since 1890s orally, originally in African-American vernacular, emerging in print 1928 in a jazz context. It might have emerged from the ambivalence of expressions like bad nigger, used as a term of reproach by whites, but among blacks sometimes representing one who stood up to injustice. In the U.S. West bad man also had a certain ambivalence:
These are the men who do most of the killing in frontier communities, yet it is a noteworthy fact that the men who are killed generally deserve their fate. [Farmer and Henley, "Slang and Its Analogues"]
*Persian has bad in more or less the same sense as the English word, but this is regarded by linguists as a coincidence. The forms of the words diverge as they are traced back in time (Persian bad comes from Middle Persian vat), and such accidental convergences exist across many languages, given the vast number of words in each and the limited range of sounds humans can make to signify them. Among other coincidental matches with English are Korean mani "many," Chinese pei "pay," Nahuatl (Aztecan) huel "well," Maya hol "hole."