No, being gay is not considered a mental illness.
The medical and psychological consensus, supported by major professional organizations such as the American Psychological Association and the World Health Organization, is that sexual orientation, including being gay, lesbian, or bisexual, is a normal and natural variation of human sexuality.
It is not a disorder, pathology, or mental illness.