Evidence:
1. A very large proportion of Andersen's fairy tales are featured by love stories from a (straight) woman's point of view. These stories are so vivid that it is very tempting to think that Andersen imagined himself (or probably herself) as the protagonists when writing.
2. The most famous work by Anderson, The Little Mermaid, is a metaphor for a trans woman who undergoes gender transitioning and finds true love. The transformation that the mermaid undergoes resembles the gender transitioning process to a surprisingly great extent.
3. Also let's not forget Andersen was actually androphilic. There is evidence that shows that Andersen was "gay".
Conclusion:
It is reasonable to believe that H.C. Andersen was not a gay man but actually a repressed straight trans woman who never underwent transitioning due to the limited technology and ideologies of that time.