I was like that starting at her age. Horrible, horrible, horrible, School was this constant nightmare battle. I loved it, but I hated it.
I'd skip the meds but do some research into how to help her...books on perfectionist children, high anxiety levels, etc. I'd also start discussing with her why grades aren't that important, etc. That happiness and following your passions, etc. are more important. I wish I could remember the book, but I read this great book by a Professor a few years ago about why A's aren't important, and why letting your kids get bad grades might work out better in the long run. It was a great book, about following your passion, not silly meaningless symbols that don't actually predict future success.....
If you are unable to help her figure out how to handle her anxiety, then I'd take her to a therapist. I would avoid all medicine and all talk of there being something wrong with her. I'd make it more about learning how to handle big emotions in a more effective way.