My suggestion on this difficult topic
Pull her aside when she has one of these moments, and calmly, explain to her how this attitude and work ethic is counter productive. Does she realize what this is doing to her gymnastics? Sometimes it seems obvious to us, but the kids so damn pre-occupied with all sorts of other stuff, they just don't see the things the coach seems.. Assume the gymnast knows nothing.
Ask her, what will work for her under these circumstances. Do not accept, "I don't know ", " I don't want to " or anything along the lines of refusal to think and seek solution to problem. If she continues like that and does not communicate, tell her that going this way will lead to the same results as her not practicing, but at least she will not be taking time away from others, by you give her time extra time, so she might as well sit and think about whatever is troubling and how you as a coach and gymnast can go about fixing it, so that she can get back to focusing on training. At the very least she has to communicate (give her time limits).. Periodically check, if she has a solution (the hardly ever do, if they do, you know you can make a difference pretty quickly, and its just a need more time, drills, spotting, plain old anxiety, fear.. With support and listening, she will let you know). After an extended period of time, if she is refusing to communicate simply move on and call a conference with the parent (let the kid know that this will happen at the end of the allowed time before hand).
This will tell a lot. If she starts crying or gets anxious or agitated about the thought of her parents coming in you have likely a problem at home, or its something she really would like to avoid discussing with her parents. This complicates things, makes you have to step in an be the supportive, caring person who is there to help her, not punish her. And it takes this thread in a different direction, as the solution is highly dependent on the problem.
In a conference you an address the problem with the parents and get them to help you out. They might know the answer already. The parents are supposed to (and for many are) the first line of support and the people the talk to most about their troubles. But the coach not communicating is usually a sign of lack of trust in a way, which they hopefully don't have a problem with their parents about.
That be my first approach, hope its of some use