Gay “conversion therapy,” which claims to help men overcome unwanted same-sex attractions but has been widely attacked as unscientific and harmful, is facing its first tests in the courtroom.