There are two “Gospel of Mary’s.”
The first, an ancient Gnostic work, survives only in fragments. It was ascribed to Mary Magdalene (not the BVM), and she is describing a vision in which she explains the progress of Gnostics through the seven planatary spheres. There is no indication this writing was even CONSIDERED for inclusion in the Canon (much less rejected).
The other is the “Gospel of the Birth of Mary,” part of pius Christian lore (and the source for the stories of Mary’s dedication to temple service). It was actually composed in the Middle Ages (though some editions attributed it to St. Jerome who was said to have translated it from a Hebrew source, but this is unlikely). At any rate, it is thought to embody much older stories and legends - possibly dating from Apostolic times.
If Mary WAS dedicated to service in the temple, she would not have been educated there. Her service would have consisted of “women’s work” like cooking, cleaning, and sewing for the priestly class.
It is doubtful that Mary was literate. It amuses me that a famous painting of Mary depicts her with a book on a bookstand, with the suggestion that she is teaching a 5-year old Christ. That’s right - a book - a bound codex! Books in bound codex form didn’t appear until much, much later. Oh well, artistic license, I suppose.
But, of course, it is also doubtful Peter was literate. Ancient people had ways around those problems (they called them “scribes”).