How long has it been going on? Less than a week, it might just be muscle strain. If it has persisted for weeks or months, it could be something else.
Has she been doing a lot of beam back walkovers? Those are killer on the back. Dd was having some minor back discomfort a couple of weeks ago, she would ice it for a couple of days and it would be fine but then it would come back. I was concerned, so I spoke to her coach about it and she took a look at DD's BWO and said she was hinging at a certain part of her back and that could be the problem. She worked with dd on doing the BWO's using her shoulder flexibility and upper back more so she wasn't relying on her lower back so much. DD picked it up pretty quickly and has had NO back discomfort at all since. It might be worth looking into. Our next step would have been to see the doctor of course if modifying the technique had not helped.
Some kids just can't take the repetitive BWOs and have to start limiting them in practice, or stopping them altogether and going to BHS instead (much less stressful on the back.) I'm hoping DD gets her BHS sometime this summer and can compete it next year and we won't have another year of BWOs to deal with. Sometimes scary things like stress fractures happen if you let the back pain go on too long. Some kids need physical therapy to help with shoulder and hip flexibility to take the stress off of their back and some do PT to strengthen their back muscles.
If I were in your shoes and I thought it was BWO that was causing it I would talk to the coach about modifying the technique or switching to a skill less stressful on her back, and if it persisted at all after that I would get her immediately to a doctor. If it has already been going on for a while, get her to the doctor anyway. I hope her back feels better soon!