The poor little girl! She is so young too! Constant criticism, nagging, pecking away at a person is serious emotional abuse. It is telling the little girl she is not good enough. The message she gets is that she is not worthy of love, that until she is perfect she cannot be loved.
The woman sounds as if she has problems. A person who "knows it all" and "If I say anything she knows best! She will get upset because she doesn't like to think she is in the wrong" is impossible to communicate with for a start! None of us knows best all the time or is never wrong, it goes without saying, so a person who has to be right all the time, who thinks she knows more than a Grandmother who has known the child from birth and raised the child's father too, well - she is not exactly humble and respectful is she? I am worried that she is jealous of your son's daughter and is trying to put her down so he finds her less appealing. I am worried that she does not like having a 5 year old around and wants your son's total attention and is irritated by the little girl. She is not behaving like an adult. She cannot listen for a start but does all the talking as you say.
I would try and be very firm and tell her you do know best and you do not want to hear any more from her.
I agree with the many people who have said how damaging this is to your DGD. GrandmaJan puts it so well when she posts out how emotional abuse in childhood stays with us all our lives. I for one can attest to that. I think you should try and protect this little girl in any way you can. Tell your son in no uncertain terms how badly it affected you. Tell him that it is abuse. Tell him that if it does not stop straight away then you will think about taking further steps to protect the child. I looked on the internet and there are several sites giving advice, I would type in "What shall I do my grandchild is being abused?" Or you can go to the CAB for advice. The kind of abuse may need evidence so if you can, write down some of the things she says and point out how this is continuously being done to the child. If, at the extreme end, any action were taken, it would probably be that the woman would not be allowed near the little girl, which your DS would not like.
Please make sure this stops. You know, I know, many of us know that the effect of this constant criticism is life-long. The child will lose her confidence and will be scared to do things where ever she is, it won't need the cruel person's presence for the fear to have its effect. We all know this.
I would move mountains to protect this little girl. She is being abused. There is no way of putting it in flowery language. Do whatever you can to help her, please.