As Billy's twin, Mary shared Billy's ability to transform into a superhero by speaking the name of the wizard Shazam.
A version of Mary Marvel, originating in The Power of Shazam!, has the same powers from the same benefactors as her brother (Solomon, Hercules*, Atlas, Zeus, Achilles, and Mercury).