Harry really is a girl.
Volotredi's Horcrux is the cause of Harry's curse.The actual Point of Divergence is when Tammy Riddlenote was born as a girl, rather than as the guy we remember from canon. After her rise to power as Volotredi, she went around making her horcruxes, just like in canon. Just like in canon, she attacked the Potters and failed to kill their infant son, Harry. When Volotredi's soul split accidently and formed the Harrycrux, the magic involved made it so that Tammy's gender perceptions overrode Harry's, and made everyone believe that he was a she. We know very little about soul-and-horcrux-related magics, but we do know that Voldemort/Volotredi was very powerful, with an ego to match. We also have no idea how a horcrux formed by a witch/wizard of one gender would react to being placed in the living host of another gender. In canon, we only see Harry (same gender), Nagini (different species, with gender perceptions never playing a role to the snake, only being referred to as a "she" rarely and incidentally), and the other horcruxes (inanimate objects). The magic would have to have been powerful enough to rewrite actual documents, as well as memories of the one-year old Harry as being "Harriet". But considering how the staircase to the girls' dorm could be fooled (possibly the way described in the above WMG, with magic reacting to both Harry's and Volotredi's wills, this could be the case with people's memories, documents, and other such things. Dumbledore, Luna, Ollivander, and the Sorting Hat weren't affected because they are in no way intimidated by Volotredi's indomitable will. Squibs and those like Petunia (exposed to magic and with muggleborn relatives) see both personae due to not being primarily magical (and thus mostly unaffected). In time, as Harry becomes stronger and asserts himself over the Dark Lady, he will be able to "will" his male persona into existence, causing much confusion at first since it will likely take practice, and thus result in "Harry" appearing and disappearing occasionally, though few will make the connection between Harry's appearances and Harriet's disappearances. This will lead to several humorous misunderstandings, such as the girls waking up Harriet in her bed and discovering Harry there, and possibly Snape's shock at seeing James appear out of nowhere - with Lily's eyes.
The curse (unintentionally) stems from Lily.It's a side-effect of the blood protection that Lily sacrificed herself to give to Harry. She was female, and while wrapped in her protection, the magical world sees Harry as female as well. The blood protections are one of the few kinds of magic strong enough to plausibly have such a potent and encompassing effect, and would explain why Dumbledore has never heard of anything like it before. If ever it gets broken or bypassed, interesting things could happen.
Volotredi is in fact canon!Voldemort, but under the same curse as Harry/Harriet.He sees himself as Voldemort, but everyone else sees her as Volotredi. Similar to the Harry/Harriet situation, the names "Tom" and "Voldemort" are unspeakable when referring to Riddle. "Voldemort" is likely Tabooed (if Riddle had the chance to do it) so that Riddle can know who knows him as male. Harry/Harriet is under the curse as a result of being Riddle's Horcrux.
An unknown third party is Secret-Keeper for the concept of Harry being male.Harry perceives himself as saying he is male because he believes himself to be male, but no one else hears him due to the effects of the Fidelius Charm. For an unknown reason, the Charm does not apply to Muggles - this contradicts canon but let's run with it. Dumbledore is able to hear what Harry is saying because the Secret-Keeper has hinted to him that Harry is male, but is unable to say Harry's name because the Secret-Keeper has not outright told him.