Check out all is well at school, does she get on with the other children teachers ,the fact she cries before she goes to school tells me there is a problem, she may also be missing her gran .
This sounds like a big change for her, and she is having a hard time adjusting. Try talking to her, and having grandma talk to her to find out what you can do to help her adjust easier.
Children love routine and change is hard for them. I am not sure why she was with grandma, but it sounds like she really liked it there.
Good Luck!
Children often don't know why they're upset.
Sounds like she misses grandma, and is anxious about the change in her life.