DD9 has this issue but it is combined with other issues like poor executive functioning and ADHD. She also has issues with writing that are the result of poor EF. So she has problems thinking of what to write, and then gets more and more anxious, because teachers would bark at her to focus and get to work. The anxiety just made the writing issues worse. She went to a gifted magnet (where everyone was gifted) and they accelerated her too high for math and she had so many gaps. The teacher wasn't really teaching the class, it was mostly independent work. The ADHD, EF issues, and anxiety all combined to make her unable to focus in math and get anything done. The less she focused the more anxious she got. We put her in a different school which tests the kids and puts them at the correct level for math. DD deliberatey threw the test (by picking random answer choices), claiming that she was scared she would be accelerated too high again. None of us (principal, teacher, me) could figure out how to calm her down enough to actually do the math assessment. Once we convinced her she would not be accelerated too high, she did really well on the test (although they had to give it to her on a computer because for whatever reason, any kind of assignment involving handwriting freaks her out at this point, thanks to teachers not following her 504).
So, in my experience, putting her in the g/t program was a huge mistake, in that she felt too pressured there, but we also did not have a good 504, the teachers weren't dealing with her appropriately, etc. If you can trust the teachers to handle her appropriately to reduce anxiety, and not pressure her, then it could work. The problem with my DD is that she didn't necessarily look anxious, she just looked unfocused and, at times, passive aggressive, which led the teachers to reprimand her.