SAN JOSE, Calif. — At the United States Olympic women’s gymnastics trials, tears were shed.  Tears from gymnasts who made the team. Tears from gymnasts who didn’t.  Tears even from Martha Karolyi, the normally stoic women’s national team coordinator, who at the end of the trials on Sunday night had no choice but to crush the hearts and hopes of the gymnasts who weren’t among those five women she had chosen to represent the United States at the Rio Games.  Now her chosen few are the favorite to win the team gold, in this, Karolyi’s final year in charge. They also are talented enough to win several — if not all — of the gold medals in the four individual events in Rio, as well as the all-around title.  The tears on Sunday were no surprise, not in a sport so mentally and physically grueling, and after a lifetime’s worth of work and sacrifice. They weren’t a sign of weakness, though. Far from it. From these superwomen, they were a natural release.  For Aly Raisman, the tough team captain and emotional leader who made her second Olympics, the tears at these trials began early. They started on Friday, even before the competition began.  After practice that morning, her head ached. Her stomach ached. She was nervous and tired, so tired. Her longtime coach, Mihai Brestyan, saw it coming.  “Just sit down and let it out,” he recalled telling her. “Let it all out.”  And so Raisman did, letting her tears soak her leotard.  Raisman — who, at 22, is known as the national team’s grandma — was thinking about how far she had come to make it to the cusp of another Olympics. The exhaustion. The frustration. But each woman who made the team had her own reasons to weep, and happiness was the basis for it.  For Simone Biles, the tumbling, twisting physical and mental phenom who could win five gold medals in Rio, some of the pressure was lifted after she won trials.  For Gabby Douglas, the defending all-around champion from the 2012 London Games, it was a relief to make the team at all. Her performance at the trials was shaky — she was seventh in the all-around — but she was given a spot on the team anyway, with expectations that she will help the United States on the uneven bars, her specialty.  Laurie Hernandez, who is just 16 and finished second in the all-around, and Madison Kocian, a world champion on the uneven bars, sniffled because they had just achieved a lifelong goal.  Raisman was overwhelmed by her accomplishment. It’s rare for an Olympian to return to a second Olympics because it’s so easy to career off track after taking time off.  Third at the trials, Raisman had taken more than a year off after she won three medals, including two golds, at the London Games.  She went on a tour with the Olympic team, hopping from city to city, eating late at night, sleeping much less than her usual 10 hours a night. She competed on “Dancing With the Stars.” She took classes at Babson College, near her parents’ home in Massachusetts. She traveled to appearances and photo shoots for sponsors.  Ah, freedom, after all her years in the gym. It was so strange and delightful, she said. Yet she wasn’t ready to forsake her sport.  So in September 2013, Raisman told Brestyan that she wanted to train for the 2016 Games. He shot her a skeptical look.  “Why do you want to come back?” Brestyan recalled asking her. “Is it because you want more sponsors, or more gymnastics?”  He didn’t believe her. Brestyan said Raisman needed to get back into “leotard shape” before he would consider resuming serious training with her.  “You need to show me your desire,” he said. “I don’t want to give you two weeks because you can be super excited for two weeks and then just die. I will give you a year. A whole year. If you are still serious after a year, we will move forward.”  She agreed to the deal.  To regain her fitness, she ran and ran. She cut back her portions of food, ate healthier and did simple moves in the gym: box jumps, toe raises, handstands on the uneven bars, punch front flips and handspring after handspring. As the year progressed, her workouts grew more difficult and morphed into twice-a-day sessions. Brestyan watched her from the corner of his eye, searching to see how hard she was pushing herself.  “Mihai always said, ‘Just trust me I’m never going to push you to the point where I’m going to kill you — I’ll stop you before then,’” Raisman said, laughing, though some days she wasn’t so sure.  After a year, Brestyan was convinced. And only then did he call Karolyi to say that Raisman would be returning to national team training camp.  Douglas, 20, returned to camp at the same time. She and Raisman commiserated.  Douglas’s comeback had also been harrowing. To get into shape, she jogged, wearing multiple layers of clothing, but last week she admitted that when she began, she couldn’t even run three miles.  “I had to stop a lot, like at every stop sign,” she said. “So it turned into interval training.”  Like Raisman, Douglas admitted that she had underestimated what it would take to bounce back. She had thought it “would be cake” to make the Olympic team because she had already done it once. But after struggling at the trials this weekend — she fell off the balance beam each night of the two-night event — she said she wished she had been more focused on her training, much earlier in the process.  “So many people thought we were crazy and doubted us,” Raisman said, referring to herself and Douglas. “But we did it.”  After her final routine on Sunday, the floor exercise, Raisman hugged Biles, who started to cry when she saw Raisman crying. The other gymnasts surrounded them in a group hug of sparkly leotards, making it look as if they were being embraced by rainbow.  “Stop crying, you’re going to ruin your makeup!” the eternally upbeat Hernandez said.  Raisman, the veteran who had been through so much, didn’t need that advice. She had planned for the moment, just as meticulously as she had planned her comeback.  Before heading to the arena, she had applied waterproof mascara. And she will bring it to Rio, too.  A version of this article appears in print on July 12, 2016, on page B10 of the New York edition with the headline: Flying High, Above and Beyond the Routine. Order Reprints| Today's Paper|Subscribe
Aly Raisman and Gabby Douglas defied the odds on Sunday to qualify for another Olympics, but each member of the U.S. women’s gymnastics team had her own reasons for feeling emotional.