Elsa has a great power that she has been taught by her parents from the time she was a child, is not publicly acceptable and that she must fear its expression, at all cost, thus hide it from people, even her own sister who could be hurt by it - even killed. Shame is at the core of Elsa's feelings about her magical powers: same-sex attraction.
As Elsa’s power increases, her parents’ urge her to learn how to control it, as it would be perceived as evil to others, but Elsa can't; it's impossible. Her parents' make the decision to close the castle to the public, and lock Elsa in her room so that her power won’t be discovered. Not even her sister is allowed to see and play with Elsa: demonetization of homosexuals by society.
Elsa is devastatingly lonely and depressed being forced to live a life of isolation, believing her powers to be evil. Her sister, kept from the truth, and affected by the inflicted secrecy also becomes victim to the dysfunction of her family and experiences equal isolation and confusion: not "coming out" and being who you are meant to be (acting on the power) is harmful to the person, family and society.
The parents are killed in an accident while traveling abroad (expendable and best out of the way for progression - represent authority), which means that Elsa must take her rightful position among her people, as queen. (Right to be queen: make what you want out of this one.) To do so, she faces great fear in going out publicly for her coronation, worrying that her powers might show because she has no control over them: rejects the ability of those with same-gender attraction to control behavior.
While at the same time her sister, Anna, is beyond thrilled at the opportunity to go outside, make friends and perhaps even meet her special someone and have her happily-ever-after: heterosexuals are free to pursue happiness through sexual relationships and gays are not - making them unequal in society.
The gates are opened - Elsa is terrified that people will see through her and that her power will show itself, regardless of what she has done to hide it. (Stay in the closet.) Anna, on the other hand, burst through the gate and experiences joy in being out in the open and meets someone whom she immediately falls in love with: heterosexuals are free to pursue happiness, without restriction. Insinuating that heterosexuals don't value marriage in the way those who work at preserving traditional marriage say that they do. No-fault divorce, as one example, is seen as evidence of this lack of care.
After only a brief interaction, Anna and Hans decide to marry. Elsa is freaked out that her sister wants to marry someone she only just met: heterosexuals diminish marriage, freely given to them without judgment of any kind - SSM can't do any more harm.
In her anger at her sister's irresponsible behavior, Elsa orders the gates shut, again, and her sister's new fiancé to leave and not return. Anna, is totally confused and begins to oppose Elsa, who becomes even angrier and sees that she is loosing control of her power. Feeling the need to run and hide, Anna, while trying to discuss the matter with her sister, becomes the cause of Elsa's power being exposed, in front of everyone. In shame, she runs away to hide.