Well, it depends on your DD's cognitive profile, personality traits and other general essential skills (writing, executive functional, social, emotional) as well as each individual teacher and each educational institution (including interacting peer groups). It is possible for the answer to be never, if for example, she attends second rate educational institutions through college and consistently miss any of their available great teachers and their strongest peer group. It is also possible for the answer to be 6th grade, if for example, she is at an elite school with a significant population of extreme talents in her specific classes. For example, I know a public middle school(not our school) that has many many students who qualify for AIME (by top scores on AMC10/AMC12) as well as some who qualify for USAMO/USAJMO (by top scores on AIME).
Whether your DD finds challenge within her particular middle school will depend on her personality as well. Middle schools around here tend to be product oriented (writing as well as multi-media)so it is up to the student how deeply/broadly they want to research and what level of work they want to produce.
If you want to find out what your DD is capable of, then consider signing her up for the SAT, particularly to see where she is and if she is anywhere near the ceiling on the verbal. For math, the ceiling is not particularly high as compare to many competition math problems. You can start her on the AMC8 (easiest of the AMCs) to see how well she solves non-routine math problems. Quite a few 5th graders (and even some 4th graders) participate so it should be a decent range of problems for her to try in 6th grade. The next AMC8 is in November but there are a ton of past ones that she can try at home before the real competition. If she gets a top score on the AMC8, then move her up to the AMC10 as that has a much higher ceiling.
Much challenge may be found in school extra-curriculars such as Quiz Bowl, Mathcounts, Chess Club, Honor Band/Orchestra.