The term gay was originally used, until well into the mid-20th century, primarily to refer to feelings of being "carefree", "happy", or "bright and showy"; it had also come to acquire some connotations of "immorality" as early as 1637. The term later began to be used in reference to homosexuality, in particular, from the early 20th century, a usage that may have dated prior to the 19th century. In modern English, gay has come to be used as an adjective, and occasionally as a noun, that refers to the people, practices, and culture associated with homosexuality. By the end of the 20th century the word gay was recommended by major style guides to describe people attracted to members of the same sex.
Special thanks to Wikipedia