Until 1973, the American Psychiatric Association defined homosexuality as a mental illness.
The APA listed homosexuality as a mental illness in their Diagnostic and Statistical Manual of Mental Disorders (DSM-II), a guide book that list different categories of mental disorders and criteria for diagnosing them. In 1973, they removed homosexuality and replaced it with "sexual orientation disturbance."
The present DSM-IV also does not list homosexuality as a mental disorder, but still has "Sexual Disorder Not Otherwise Specified" as a diagnosis for someone with "…persistent and marked distress about sexual orientation
(
src)