You've received great advice already, and I don't have any additional advice re how to help your dd adjust to the change in receiving grades and not always being at the top of class, but there's one note in your post that might be worth considering:

Originally Posted by atnightingale
Unfortunately, the other kids seem to be obsessed with grades, and many wave them in each other's faces, when they do very well.

It's possible that there's an underlying classroom/school issue you might want to consider here - school or program culture. We found in our school district that the FT gifted program had a relatively large number of parents who were obsessed with grades, with having their children id'd as gifted, with thinking that their children were uber-AP and Ivy-bound, and the parents were talking about all this at home with their kids (and in some cases applying a lot of pressure) even in early elementary. Some of the parent meetings I went to were just nuts (from my perspective). When we looked at the program as a whole, no matter how great the academic opportunities were that it offered, we felt it wasn't a good social fit for the values we wanted our ds to be exposed to. He eventually went back into it when he was older, but at a point in his life where he was older and mature enough to put worry over grades etc that came from outside (other students) into perspective.

Hope that makes sense - in a nutshell, just because a program is a gifted program, doesn't necessarily make it the best fit program for your child or family.
So if you feel some of the worries over grades are coming from the values or worries of other students, take a close look at it.

Best wishes,

polarbear