Welcome Olga!
How sad that your gd isn't interested in taking care of her own child! Sounds like she may have a drinking problem, of course, which probably messes up her thinking. And I suppose the father is no use either, am I right?
Imo, you're a very "young" ggm (I guess gd is a very young mum) at 63. And you sound very enthusiastic about being there for this child. I don't see any reason why you can't carry on with caring for her as you are.
How did you "find out" that social services was questioning your ability to foster your ggc? Did you hear it from a reliable source?
If you think they might take baby from you, is there anyone else in the family - younger, I suppose - who might be willing and able to step up? A gp? Aunt? Anyone? That way baby would still be with a family member.
Anyhow, if you feel baby is better off with you fostering her, but ss doesn't agree, then yes, you might have to get a solicitor involved. I hope it doesn't come to that, but I think you should start looking into it now, jic.
Whoever fosters the child, ss might want to reunite her with her mum (your gd), eventually. If you're the foster mum, you'll need to be prepared for that.
Praying for you and ggc!