Claudidoll -
Speaking from experience on this topic, non gymnast child. Anxiety (if clinically diagnosed) in children is an ever changing issue for both the parent and the child. The "coping" changes on a constant basis as the triggers for their anxiety fluxuate as they age, as their social environment sifts, school pressures ..etc. A child will often take years to learn the triggers and then the correct "coping" responses to each event, maturity and age does make this somewhat easier.
My advice, again from experience, is that you need to remove her from this current gym. She will not - trust me - ever be able to function as a doubt has been cast, this doubt no matter what "coping" skill is learned will live in her mind, and an 8/9 year old is not mature enough handle the constant "coping" necessary to suppress it. It will live there and fester, the anxiety will shut her mind down which will shut her body down. Gymnastics may turn out to be too much as it is a high stress, high pressure environment not really the best for an anxiety issue but only time will tell for her.
Anxiety is a journey and often a long one till it can be managed. Do not mean to be a downer here but it is the truth from where I sit.