But the challenges are not only external. To a degree that is rarely acknowledged in the public square, many evangelical churches are also grappling with internal questions. Especially in and around large urban areas, pastors increasingly report that some openly gay and lesbian Christians are opting to worship in evangelical congregations (“more and more are coming to our church,” Mr. Allison said) and that heterosexual worshipers are struggling over the church’s posture because friends or family members are gay.

“There is a growing desire on the part of some, even within the church, to combine their Christian faith with the acceptance of homosexual practice,” the Wheaton Bible statement acknowledged.

Image Gay pride events on Sunday in many cities, including New York, were made more celebratory by Friday’s Supreme Court ruling. Credit... Chang W. Lee/The New York Times

The result has been an obvious change in tone and emphasis — but not teaching or policy — at many churches. Almost all evangelical churches oppose same-sex marriage, and many do not allow gays and lesbians to serve in leadership positions unless they are celibate. Some pastors, however, now either minimize their preaching on the subject or speak of homosexuality in carefully contextualized sermons emphasizing that everyone is a sinner and that Christians should love and welcome all.

“Evangelicals are coming to the realization that they hold a minority view in the culture, and that on this issue, they have lost the home-field advantage,” said Ed Stetzer, the executive director of LifeWay Research, which surveys evangelicals. “They are learning to speak with winsomeness and graciousness, which, when their view was the majority, evangelicals tended not to do.” A handful of evangelical churches have changed their positions. City Church in San Francisco, for example, has dropped its rule that gays and lesbians commit to celibacy to become members, and GracePointe Church in Tennessee has said gays and lesbians can serve in leadership roles and receive the sacrament of marriage. Ken Wilson, who founded the Vineyard Church in Ann Arbor, Mich., published an open letter calling for a greater embrace of gays and lesbians in evangelical churches. But Mr. Stetzer said they are the exceptions.