It's a bit tricky when there is BPD involved.
Our instinct is to reassure the child and point out the correct reality, but that skips over a really important emotional piece.
Kids who have a BPD parent tend to receive very little emotional validation -- the normal parent-child roles get reversed, so that the child is giving emotional validation to her mother, instead of vice versa.
Validation is the cup of water to their little seedlings.
This is not an intuitive skill and takes some learning and practice.
GD: "Why does mom hate me so much?"
GM: "Something very hurtful must have happened for you to feel that way. Do you want to talk about it?"
GD: "She got mad at me for wearing two different colored socks. I was actually wearing matching socks."
GM: "Gosh. That is so confusing. If someone said that to me, I would be so confused and hurt. How did you feel when she said that?"
GD: "I felt confused and hurt and angry, but mostly hurt."
GM: "You felt confused and hurt and angry, and mostly hurt. I would feel the same way. Does it help to sit here with me and cuddle while we talk about how you feel?"
GD: "Yes. I don't know why she gets like that."
GM: "I don't know either. I think you are very brave to tell me how you feel."
You create a validating environment so she feels her feelings are real, she is not alone, without saying anything bad about her mom. If she takes sides (grandma says mom is xyz), then she will increase the chance of escalating conflict with her mom, instead of learning to take care of herself by seeking out a caring adult to validate her reality.