Dana Vollmer spent the last Summer Olympics in Fiji, swimming in the warm open waters of the Pacific Ocean. She did not feel good about herself. She did not feel good about her body. She did not feel good about her life’s pursuit, competitive swimming. Her would-be teammates, those she had joined four years earlier as a teenager in Athens, swam for gold in Beijing. Vollmer swam away from it all.

“We felt like we needed to get her out of the United States,” said Teri McKeever, her college coach, “and out of — for lack of a better way of putting it — her pity party.”

There was a different party here Sunday night, one that featured Vollmer standing in the center of the medal stand at the Aquatics Center in the London Games, right hand over her heart, belting out the words to “The Star-Spangled Banner.” Her journey through the water Sunday took all of 55.98 seconds, the fastest time ever in the women’s 100-meter butterfly, the one that gave the U.S. women their first swimming gold here. Her journey to make that swim, though, took eight years filled with failure, growth, reassessment, change — and ultimately joy.

“I was just thinking about all the work so many people around me have put in, and the belief that everyone had in me,” Vollmer said. “There have been multiple moments in my career where I didn’t know if I was going to be able to keep going.”

On a night that featured another American medal from a swimmer with a similarly complicated relationship with the sport — a bronze for Brendan Hansen in the 100-meter breaststroke and another medal for a care-free goofball, a silver for Allison Schmitt in the 400-meter freestyle — Vollmer stood out both for her performance and her story. The condensed version: She made the American team as a 16-year-old in 2004, full of hope and promise. She failed to make the team in 2008, full of shame and regret. And then, the difficult questions came.

“It took me a little to make the transition to even know that I wanted to swim again,” Vollmer said.

McKeever, the coach at the University of California-Berkeley who doubles as the head coach for the U.S. women’s team here, facilitated Vollmer’s trip to Fiji, where she worked with Milt Nelms, a coach known for unorthodox approaches. Vollmer had long dealt with injuries and health issues. By this point, she was beating herself up physically, and doing worse mentally. Fiji, where she was insulated from the results at the Beijing Games, started the process of changing that. She later discovered, too, that she had food allergies and had to adjust her diet. She got married. A complete overhaul.

There is, then, little resemblance from the shaken figure at the 2008 Olympic trials, and the proud champion who smiled all night here.

“I look back to 2008, and I wasn’t excited to race and to compete,” Vollmer said. “I was more worried about what happened if I failed and who did I let down and how that would look for Teri and my hometown, and kind of everyone’s expectations. I crumbled under that. I couldn’t take all that on.

“Now, to finally be healthy, to feel stronger as an individual and know who I am, I can get up there and absorb all of what I took as expectations before as excitement and energy. The fact that I’m nervous before a race is a great thing.”

Sunday night, she looked all of that — nervous, excited — before she climbed on the block for the final. She flexed her long, lean body like a bow, jumped, wiggled her legs, then hopped to the start. At the 50-meter mark, she trailed Jeanette Ottesen Gray of Denmark and American Claire Donahue. This was not a concern. It’s where she usually sits at the midway point.

After she turned and sprang off the wall, she emerged from the water nearly in the lead. From there, it was over. No woman had ever broken the 56-second mark in the 100 butterfly, and as Vollmer pulled away, that was the only remaining question. She crushed sliver medalist Lu Ying of China by 89 hundredths of a second. When she pulled off her goggles and blinked her eyes clear, she saw the numbers on the scoreboard, and raised her right fist, pumping it.

“She’s just a beautiful person,” said Australian Alicia Coutts, who won bronze. “I don’t think anyone’s more deserving than she is. I’m just glad to have been part of the race.”

That, too, was Hansen’s attitude. Once the world-record holder in both the 100- and 200-meter breaststrokes, he failed to win both in Athens — losing to Japan’s Kosuke Kitajima — and then crashed in 2008, making only one race for the Olympics and lagging badly. So the bronze he won Sunday — behind Cameron van der Burgh of South Africa’s world-record 58.46 seconds and silver medalist Christian Sprenger of Australia — was immensely satisfying, not in the least because he beat Kitajima, who swam a lane away.

“It’s the shiniest bronze medal I’ll ever have,” Hansen said.

Schmitt trailed France’s Camille Muffat the entirety of the 400 freestyle, but set an American record of 4:01.77 in taking her silver, handily beating Britain’s Rebecca Adlington, who won gold four years ago but bronze in her home country.

The night, though, was Vollmer’s. No one else had a performance like hers.

“I did something that no one’s ever done before,” she said. In a way, surely, no one envisioned doing it.