I am quite horrified there is such an attack on you here OP. Yes, you have been a bit insensitive but many who haven't gone through such a traumatic experience themselves don't know how to deal with such a thing. Not that this excuses any insensitivity as we should all be careful not to hurt the feelings of someone who is already grieving such a terrible, terrible loss.
I think honestly she wishes she was in your shoes. She'd love a baby and when she has one, she loses it. However when her best friend has a baby she has no problems whatsoever and wants her to celebrate with her. If she really could I am sure she would but you have everything she could possibly want right now and aren't being at all sensitive about it. She really wishes that she could be happy for you but honestly if you even tried to put yourself in her position - I mean properly - wouldn't you want to not be around her too? Because it would remind you of what you lost. It may seem irrational but I guarantee when you have gone through such a trauma the last thing on your mind is being rational and rightly so.
I feel for you because others are attacking you for not knowing the date, although you have said she didn't really want to talk about it. So obviously you didn't push the issue. Some people cope with talking, others withdraw into themselves - it doesn't mean their friends have been bad friends. A good friend respects boundaries but promises to always be there.
In an extremely less serious case thank goodness, I have a male friend who is with a woman who a year ago found out I was pregnant. At the time he stopped talking to me completely and blanked every message I sent him, ignored my Facebook messages and told others he didn't want to talk to me. I was deeply insulted. I found out about 6 months later he thought he couldn't have children (he, or the partner, they weren't too sure) but then found out there wasn't a problem as such, just maybe a bit more difficult. Anyway March this year they started to talk again as his partner is now pregnant and he doesn't feel like he has to avoid me anymore. I know it's not half as serious, but it illustrates the hurt someone can have when they feel you are granted all your wishes and they aren't given theirs.
I am thinking of her and her poor little child that she lost. I hope she is happy and not feigning it, because it must be really hard.
When she mentioned it was the date that her child passed away, you should've been a lot more sympathetic. Perhaps by 'distancing yourself' she thought you were blaming her for her reaction and therefore didn't want to be involved with you anymore. In hindsight perhaps it would've been better to apologise and say you were here to chat whenever she need someone to talk to and if she fancied meeting up/having a coffee etc to just call you and you'd try and arrange it.
Once you realise that you have probably not acted the most appropriately about this, is when I think the right time to approach her is. It seems an awful shame to ruin a relationship over something that should make her want to have you their as support more and for you to be more sensitive to her needs.
When you do decide to make the move just start casually at first and if the topic is raised, do apologise for being insensitive and be honest - you really didn't know what to say or do, so you stupidly said/did nothing. It's the truth and everyone appreciates the truth, even if it isn't the nicest.
I am sorry for the essay of a response but felt that you were being battered on when you were just a bit ignorant, not a bad person.
I wish you both the best of luck.