I'm sure there are plenty of never-released gay/lesbian films from early cinema, but what was the first film released in theaters for the general public? For this question, let's consider openly gay someone who claims they are gay with words, or participates in PDA on screen (not looking for films with implication of sexuality, but factual evidence).
Plot summary from wikipedia:
Veidt portrays a successful violinist, Paul Körner, who falls in love with one of his male students. A sleazy extortionist threatens to expose Körner as a homosexual. Flashbacks show us how Körner became aware of his orientation and tried first to change it, then to understand it.
After Körner's coming out, he and Sivers begin seeing each other more openly. While walking together, hand in hand, through the park, they pass a man who recognizes Körner. Later that day, when Körner is alone, this man, Franz Bollek (Reinhold Schünzel) confronts him and demands hush money or else he will expose Sivers.
See also IMDB
For the second time today, I find myself submitting Mädchen in Uniform from 1931 as an answer... Though there were various gay stereotypes in film before it, I struggle to find an earlier movie that had a lesbian character (in this movie a 14 year old student in love with her female teacher) that actually confesses her love. It also features a lesbian kiss in the guise of a 'goodnight kiss'. German cinema contains some earlier examples like Sex in Chains from 1928 and Different from the Others from 1919 mentioned in knut's answer, but the former only contained ambiguous homoerotic themes and the latter was severely censored and restricted.