Gay is now the most general informal term for "homosexual". It began to be used in this sense from around the 1920s. In the 19th century, "gay ladies" had meant prostitutes.
Its first use meaning "homosexual" in a film is thought to have been in Bringing up Baby in 1938.
In the 1970s "gay" was generally applied to both sexes, but it is now more commonly used to refer specifically to men, hence the more general phrase "gay and lesbian" came into use, subsequently overtaken by LGBT and its variants.
It is no longer thought correct to use "gay" as a noun, hence "He's gay" is preferred to "He's a gay", and "gay people" to "gays".
Sometimes, particularly among school children, "gay" is used as a generic term expressing disapproval, with no specific reference to homosexuality.