First, it might have been a bad match with your grand-daughter and the teacher. I would like to say, "Oh, I just can't believe that the teacher said that!" However, I have known some teachers like that.
There are any number of reasons for behaviors like this. Your grand-daughter might not have been used to having limits set for her. Also, since she made 100 on her admissions test, she might have been bored. Kids who have Asperger Syndrome, a form of high functioning autism, can behave like this. I would take the child to be evaluated by a psychologist who has experience with kids who have behavior issues and autism. Rule it out. Also, DO NOT put this child in a class with this teacher ever again!
You do not want a bright child who is eager to learn to get turned off about school. It can effect their whole life.