every state is different, and unfortunately, by not seeking guardianship earlier, im not sure where you stand.
as am immediate intervention, if you are truley in fear if she stays there, you would call child services and discuss with them the situation. the problem with this is, if they decide in his favor, he will probaly not let you see her in the future. but if you really fear for her safety, its the right thing to do.
aside from that, you may want to call up the welfare office and ask about the situation. if you can prove, via all your grandaughters records, that she lived with you for all these years, both parents may be charged with fraud if they had been claiming her the whole time. but again, you would need to contact your local office.
at the very least, in your situation with proof of whats going on, if they didnt let you see your grandaughter, your state may honor grandparents visitation and im sure in your case, it would be granted.
the main problem i see is that your daughter is still on his side. anything you may want to do in your favor to have your grandaughter removed from their home will harm your relationship with your daughter. then you have to worry about in the future, her regaining custody.
im sorry you are in this situation. find a couple of lawyers who give free consultations. that way you can ask each one a few questions in the free time to get a grasp on any options. if it seems that you either cant afford the fight, or they honestly tell you it wont go anywhere, take a breath and decide if she is in danger, and if you really want to push them. it could either save her or take her away from you forever. act fast if you plan on acting, as each day she is there, it will not help your situation. i hope you can find a lawyer to help and i hope your grandaughter is well and being cared for. good luck to you.