If you fear persecution or risk inhumane or degrading treatment or punishment in your country of origin because of your sexual orientation or gender identity, you may in principle be granted asylum or protection in Denmark. It is not easy, but here is what the law says:
The Danish Aliens Act says that asylum may be granted to a person who has well-founded fear of being persecuted for reasons of race, religion, nationality, membership of a particular social group, or political opinion. LGBT people may constitute ‘a particular social group’.
In addition, the law says that Denmark grants protection to asylum seekers who risk the death penalty, torture, inhumane or degrading treatment or punishment, if they return to their country of origin.
If you are fleeing with your partner, and your partner is not persecuted himself/herself, then, if you are granted asylum, your partner may be granted asylum in consequence.