In the 18 months since Mitch Mayne became executive secretary of his San Francisco Mormon church, attendance has expanded from an unlikely community: gay and lesbian people and their supporters.

Mr. Mayne is gay and is one of the few out officials in the Church of Jesus Christ of Latter-day Saints, which has a history of opposing gay-rights causes and considers acting on same-sex attraction a sin.

That...