The first English usage of the word "cocktail" for a drink is from 1806, when it was described as "a stimulating liquor, composed of spirits of any kind, sugar, water, and bitters" and noting that this "renders the heart stout and bold at the same time as it fuddles the head." Throughout the 1800s, the word was limited to this particular kind of mixture, but at that time the world of mixed drinks was very small. The 1862 guide by bartender Jerry Nichol says that the cocktail "is a modern invention, and is generally used on fishing and sporting parties, though some patients exist that it is good in the morning as a tonic." In other words, you would probably not order one in a saloon.

Although they gradually gained acceptance over the latter half of the 19th century, the period where cocktails were most popular was the 1920s, during Prohibition in the United States. Mixed drinks were necessary to cover up the low-quality alcohol that was illegally obtained by speakeasies. Commercial bootleggers did not bother with wine or beer, so it was necessary to make spirits palatable to those who would not normally drink them. During this period the American habit of mixing drinks spread across the Atlantic Ocean, even though there were no prohibition laws outside the U.S., because technology was making it easier to keep ice on hand for those which required them.

A bartender writing after the repeal of Prohibition included some of the concoctions in his guide, but noted that "They are published here as a matter of record and as a mirror in which future Americans may see the follies which the enactment of the Eighteenth Amendment produced." After repeal, simpler cocktails such as the martini replaced the elaborate ones in popularity for a few decades, but fashions change and mixed drinks with more ingredients and different tastes have come back since the 1950s.

Sources:
Barr, Andrew. Drink: A Social History of America. New York: Carroll & Graf Publishers, Inc., 1999.
http://dictionary.oed.com
http://www.sasky.com/saskycom/databases/cocktails/categories/