While the Infinity Stones feel like the heart of the Marvel Cinematic Universe, the fact is, the first one didn't show up until Captain America: The First Avenger. None of the standalone Iron Man movies even mention them, and neither does the first Thor film or The Incredible Hulk. In more recent times, Black Panther also eschewed them altogether. So there was no reason to assume any would show up in Captain Marvel. However, with Avengers: Endgame right around the corner, an Infinity Stone did make an appearance. How did Captain Marvel get her powers? Warning: Spoilers for Captain Marvel follow.
The first Infinity Stone was not called any such thing when it first turned up in Captain America: The First Avenger. It was called "The Tesseract." It is the item Red Skull is obsessed with finding, to power Zola's evil war creations and lose weapons of mass destruction upon the world. In stopping him, the Tesseract case is opened, throwing red Skull through a wormhole, and burning a hole in the plane before falling into the ocean.
At the end of Captain America, Howard Stark, Tony's father, finds the Tesseract. The assumption by fans was it then was taken by S.H.I.E.L.D. where it remained until the events of the present day.
This may have been true, but at some point in the mid-1980s, the Kree scientist Mar-Vell, operating under the name Dr. Wendy Lawson, got her hands on it for experimentation. Her work was the genesis for Project P.E.G.A.S.U.S., a joint project between NASA and the USAF to create a light speed engine using the strange item.
As viewers discover in Captain Marvel, Lawson never gets to test the engine. Upon reaching space, Lawson and Danvers are immediately attacked, and forced into a crash landing. When the Kree who brought them down, Yon-Rogg walks up, Lawson tries to destroy the engine, but he kills her first. In retaliation for her mentor's death, Danvers seizes the gun and shoots it herself.
Instead of blowing up, all the energy from the Tesseract instead looks for somewhere to go, and follows the trajectory of the last know energy source, the pistol and the woman holding it. Next thing you know, Carol Danvers has absorbed all of it.
As fans now know, the Tesseract is the Space Stone, one of the six stones Thanos gathers together to create his gauntlet and destroy half the universe. No one knows precisely how the Avengers will reverse this event. However, there is now proof Danvers is a woman with a superpower derived directly from an Infinity Stone.
She is, in essence, the power of the Space Stone in flesh form. A one-woman anti-ballistic missile system, she can take out entire spaceships in a single bound. Fans wondering why she hasn't aged should be asking themselves if Danvers' transformation made her immortal because that's a far more logical explanation.
Danvers left the Tesseract on Earth for safekeeping. Let's hope she's not too upset when she finds out how that went in her absence.