Conversion therapy, also called reparative therapy, has been widely denounced by medical professional organizations as traumatizing and harmful to minors. The American Academy of Pediatrics warned against it as early as 1993, saying it reinforced anxiety and shame. In 2009, the American Psychological Association condemned the practice in a report, saying that conversion therapy was predicated on the idea that homosexuality was a mental disorder.

But despite the consensus that conversion therapy was unsound, it has remained fairly common, said Mathew Shurka, who underwent conversion therapy and works as an activist fighting against it.

An estimated 698,000 L.G.B.T. adults in the United States have received conversion therapy, according to research by the Williams Institute at the U.C.L.A. School of Law, which studies L.G.B.T. issues. About half of them underwent conversion therapy as teenagers.

Mr. Shurka was among them. He was 16 years old in 2004 when his father took him to a therapist who said he could make gay people straight, and he spent five years undergoing the purported treatment.

Conversion therapy assumes that everyone is a heterosexual, Mr. Shurka said, and that same-sex attraction is caused by childhood trauma. The therapists say, “If you can just heal that trauma and understand what your role is as a male or female, you will naturally start to be attracted to the opposite sex,” he said.

Mr. Shurka said he was told to separate from his mother and sister for three years to make sure that he did not look at women as his peers.

Mr. Shurka worked with Mr. Hoylman and Assemblywoman Deborah J. Glick, a Manhattan Democrat who was New York’s first out gay legislator, when they introduced a bill to ban conversion therapy in the state in 2013.