(1) "I understand that you feel that way, but my intention behind that statement was ... ." (2) "It's unfortunate that you feel that way, but my intentions were ... ." (3) "I can see that my actions have affected you, by my intentions were ... ." (4) "I didn't intend to upset you, my intentions were ... ."
would be better for issues in the future.
In regards to how she responded. You can't control how people interpret and handle situations. You can only change with how you deal with it in the future, knowing that she has responded this way should let you know that (
I would from now on keep all conversations in written and storable form via email, letter, or chat, and if you need to talk to her, make sure you plan what you are going to say and make sure you have another colleague in the room as a referense to the conversation.
If you feel you want to remedy to the situation, I would set up a meeting with HR and try and come to a solution.
As a general statement on society, this kind of thing is probably rare, but it's common enough to make me see it as a negative risk to work with anybody other than straight White (or maybe Asian) men, because everybody else has social power over you to fuck you over for any perceived slight.
Given that you have Asperger’s, this is likely something you do to everyone, and not related to gender. You probably have a lot of knowledge and it’s natural to want to share that. However you may be missing subtle clues that the person you are talking to doesn’t need or want you to teach them because they have 100% of the ability of anyone else.
Was HR involved or did she tell you this directly? I’d recommend explaining that you have Asperger’s, apologize if your behavior is perceived as offensive and ask for help adjusting your communication. Presenting this as a disability could help counter the perception of sexism by implying that others are being ableist. Don’t actually says that though. The unsaid implication will be enough to set the neurotypical person’s hair on fire.
"She has many friends in the department I have none". This to me is the clearest indicator of what is going on: She's just exercising her social dominance; This is not about you; She has decided she doesn't like you^0, and there's probably not much you can do about it, because: even if you had the means to communicate clearly to resolve any misunderstanding, she may be set on framing you as at-fault, so she won't care. And second, if she is just flexing her social muscles and power here, she will easily turn all her friends against you, and will certainly rely on rumours and accusations. She just wants a scalp, to show her power, that she can execute someone if she wants to. This gives her a sense of power and control, which is really important for her to feel at ease. So you were, by virtue of your lack of social capital, simply the low hanging fruit. She will leave a trail of such scalps behind her as she attempts to express her social power to bring herself more power and control.
Also if this is the situation, I don't know what you specifically can do--I know I could do some things, but I don't know you. So let me ask you: if this is the situation (for the sake of experiment, assume it is) what is your plan now?
Maybe advice from people who know how to turn a social disadvantage around to their advantage would help, but maybe you need to just take the loss and the lesson here (the lesson is not avoid pissing off toxic people, it's, I think: cultivate relationships to ensure you don't lack social power and make yourself a target) and move on to greater things.
^1: You may have done something to irk her or maybe not, I don't know. But even if something you did pissed her off, you didn't do something wrong objectively. It may have been her wilful misinterpretation of something you did, in other words, she seeks fault in you simply to create a fake justification for her pre-existing dislike of you that that she doesn't understand, and then can use as a way to "lift" her personal dislike to the level of social censure with a fake story of your badness; or maybe she genuinely thought you were shading her, when actually it wasn't like that at all for you; or maybe she is simply a predator picking on you because you are weak and she is strong (socially). It's not that she dislikes you, it's simply that she needs a scalp, and you are the low hanging fruit.
It's hard for me to comment on the specifics of this situation because social dynamics are complex. Given you have aspergers it's entirely possible you're doing things wrong without knowing, but it's also possible this person being unreasonable.
All I can really do is give advice based on what I've learnt as a fellow aspie who once lost their job for being an aspie in the workplace.
Firstly, you shouldn't be trying to make friends at work. If people ask you personal questions you should always redirect the conversation to something work related. But more importantly, you should never (under any circumstances) ask people personal questions – especially females. The reason you shouldn't ask personal questions is because if you're aspie you probably struggle to maintain eye contact and you probably speak in an unusual, perhaps awkward monotoned way. Asking a women, "what did you do on the weekend?" without eye contact and with typical aspie inflections will often be preserved as creepy. And it's possible you might also just look be a bit weird which can add to this. For example, it's quite common for aspies to have strange fashion sense, or look greasy because they haven't washed for a week. Basically everything about you could be sending red flags to this women to the point that it doesn't really matter what you're actually saying to her, the main issue is simply that you're communicating as a person with aspergers.
Secondly, do not engage in casual group conservations, avoid office parties, and do not joke about anything. If you can, even attempt to avoid laughing at jokes or behaviour you find funny. Humour is extremely dangerous for aspies. Causal settings like group chats during lunch, or Christmas office parties tend to be full of humour. Humour is often controversial, but as an aspie you probably don't have a good sense for what's appropriate. Even if you believe you know the rules, you should assume you don't. There's simply too much subtlety in humour and what's appropriate will vary massively on minor variations in context. You might know how to act 95% of the time, but that 5% can cost you your job.
Finally, be extremely polite. Obviously there's the basic stuff like saying please and thank you, but also just acknowledging people for doing good work or being helpful around the office can go a long way. People might not understand you, but if they just know you well enough to know you're a pleasant and polite person in my experience they'll treat you much better. Obviously don't go over the top with compliments – I'm assuming you're at least socially adjusted enough to be able to say "thanks" to someone without coming across as weird here.
In regards to this specific situation, I'd suggest you avoid this person as much as possible and if you interact with them ensure it's purely work-related. But also make sure you do this while being as polite as you possibly can be to them. If you look like you're avoiding them and shutting down them down when they attempt to communicate with you you also won't be doing yourself any favours. That's why you always engage, act polite, but always redirect conversation to something work related.
But that's just my advice, as one aspie to another.
*You don't really need to say it was some rando on Hacker News who advised you... though if you're really concerned I would be proactive in contacting to HR first rather than being the one to react to an accusation. Citing your Asperger's and that she's being insensitive to your handicap, which is deeply hurtful and is leading to a hostile work environment might work too... allegations can go both ways and I presume you can document your Asperger's and she might not be able to document anything. Of course, you might want to get REAL counsel rather than just mine.