It makes the most sense for Mormon theology if gay people don’t really exist. Since in Mormon belief, heterosexual marriage and child-rearing is projected into eternity, and a central element of what we’re supposed to be doing with our earthly existence is to get started on that long-term heterosexual project, then heterosexual attraction is fundamental to the mortal experience. God created us, we are told, to be physically and emotionally attracted to people of the opposite sex because having a monogamous, church-licensed sexual relationship and raising children with a person of the opposite sex is arguably the point of mortal life according to current church teachings: the ideal life that paves the way to an ideal afterlife. Why, then, indeed, would God create people who lack the fundamental heterosexual drive necessary for either a fulfilling mortal life or exaltation thereafter?
So for a long time, that was our answer–there weren’t really gay people, only people suffering from certain perverted tendencies arising from dysfunctional experiences in early life, who could be “fixed” with the right therapy (or the application of the right electric shocks) (I’m talking about this in somewhat detached terms, but it’s worth remembering that it’s an ugly, violent history). For some people, this remains the most satisfying solution–that homosexual attraction is somehow not really “real”–and this position does allow the theology to remain internally coherent. It does not, however, allow the theology to accommodate what we know of reality, which makes it hard to trust as theology. Since sexual orientation has not been shown to be changeable in most cases, and cannot be linked in any empirically regular way to childhood abuse or family dysfunction, it has become increasingly difficult to argue either that homosexuality is a choice, or that it can be, so to speak, straightened out. Sometime in the 90s we quietly reversed our position–not on the licitness of homosexuality, but the naturalness of it. In 1971, homosexuality was a “hidden menace” and a “ruinous practice” fallen into through curiosity or too much masturbation, and emphatically curable; in 2015, we are reminded to treat LGBT individuals with respect and love, and homosexuality as an orientation is emphatically not a choice or a sin (although homosexual actions remain both, in the official LDS position).
I think this is a much weightier shift than we generally acknowledge, in that we haven’t just shifted in how we respond to homosexuality, but in what homosexuality is. No longer understood as a disorder that obscures the natural heterosexual desires all people are assumed to have, homosexuality has become a real thing–an existential reality, a thing that some people just are. Homosexual people are not actually misguided or damaged heterosexual people, any more than tall people are actually short people who accidentally grew too much. In the last twenty years, gay people qua gay people have become real in a way that they were not, in Mormon (and much other) thinking, for most of the twentieth century.
The problem the Church is up against now is that we haven’t had the revelation that tells us how, then, homosexuality fits–or really, how homosexual people should live, especially within the Church. Given the heterosexual shape of the Plan of Salvation, Packer’s notorious question, which he clearly meant as rhetorical, becomes actually very pressing: God did create gay people, they undeniably exist in the world, but if the Celestial Kingdom is a heteros-only party, then what on earth was God up to when he made some people gay? We’ve already re-evaluated mortal reality; now we need, as a church, to pursue revelation about what this means cosmologically. Pablumy this-is-just-your-trial-in-mortality talk doesn’t accommodate the challenge that the very existence of homosexuality makes to LDS beliefs about the purpose of mortality and its relationship to exaltation. Right now we’re in an awkward, in-between place where we’ve made this significant change in what we understand homosexuality to be, but have yet to follow through the consequences of that change. The Mormon Church has acknowledged that gay people are real and sexuality is not “curable,” but has yet to offer a tenable way for gay members to remain Mormon (or, for that matter, a reasonable public stance on what the Church imagines that non-Mormon gay people should do). Our current position is implicitly that gay people can stick around as third-class citizens, objects of suspicion and pity with limited opportunities for service and deficit social capital, and this simply cannot be sustainable–not if we want to be a church that offers everyone equal access to God and exaltation.
I’m optimistic, though, because I think the harder change is the one we’ve already made, in shifting our view of the ontological status of homosexuality. We now believe gay people are real, and I think we can sidestep the consequences of it only for so long. Telling gay people to just not act on their homosexual desire made a kind of sense as long as those people were imagined to not actually be gay–to be recoverable as straight people–but if gay people are actually really and truly gay, then this sort of policy starts to look like the whim of an arbitrary and cruel God. If we don’t believe in that God, perhaps it’s time to be praying for further light and knowledge to see our way out of this intolerable status quo..
 Recalling, of course, President Packer’s notorious question in his 2010 conference address. It’s also worth emphasizing that homosexuality poses a fundamentally different order of theological difficulty than do the existence of alcoholism, OCD, single people, and disability, all of which I have seen compared to homosexuality, in that none of these other conditions (loosely speaking) so directly subvert such a central element of what we think it means to be Mormon and a child of God with the potential for godhood.
 The APA‘s current language: “There is no consensus among scientists about the exact reasons that an individual develops a heterosexual, bisexual, gay, or lesbian orientation . . . Many think that nature and nurture both play complex roles; most people experience little or no sense of choice about their sexual orientation” ; “To date, there has been no scientifically adequate research to show that therapy aimed at changing sexual orientation (sometimes called reparative or conversion therapy) is safe or effective.”
 For the former see the “New Horizons for Homosexuals” pamphlet written by Kimball and published by the Church in 1971, which you can read here, and of course The Miracle of Forgiveness for the masturbation claim; for the latter, see anything at mormonsandgays.org. You can also, for more detailed coverage of this history, see Kaimi’s sketch of changing LDS attitudes toward homosexuality at T&S, and Seth Anderson’s thorough timeline of significant events related to Mormons and LGBT at Rational Faiths.