Bitters in one form or another, have been around for hundreds, if not thousands of years. They are essentially a concentrated extract of herbs and/or spices, typically with a high alcohol content. Originally intended to be used for their alleged medicinal value, they evolved over time to become alcoholic elixirs in their own right.
When the cocktail first came onto the scene (circa. 1800) bitters were used as a defining ingredient, and were considered as required for over a hundred years. According to "Old Waldorf Bar Days" (1931, by Albert Stevens Crockett):
In the Old Waldorf Bar Book, bitters of one kind or other was considered a necessary ingredient of most Gin cocktails. The favorite was Orange Bitters, which appears in something like one hundred different recipes. A distant second was Angostura. Then there were Calisaya, Boonekamp, Boker's, Amer Picon, Hostetter's, Pepsin, Peychaud, Fernet Branca, and so on. The Bitters was used in small quantities, ordinarily described as "one dash" or "two." But Bitters used to contain alcohol and prohibition made most brands illegal to import. One well known firm which specialized during prohibition in importing liquors whose alcoholic content had been reduced until they could be brought in as "flavoring extracts," told me it had not imported Orange Bitters in fourteen years.