Jake Bain, a freshman at Indiana State University, keeps a photo of himself and his boyfriend in his dorm room.CreditA.J. Mast for The New York Times

TERRE HAUTE, Ind. — Jake Bain’s dorm room is a typical college crash pad, right down to the rumpled bedsheets and hampers overflowing with dirty laundry. Less common, for a space shared by two Division I football players, is the photo collage taped above his bed: Jake and his boyfriend kissing at their high school graduation; a romantic selfie of Jake resting his head on his boyfriend’s shoulder; the young couple holding hands at sunset.

The Indiana State University athlete’s very public coming out last fall — during a 13-minute speech inside an auditorium to his entire Missouri high school — was an act that continues to shape his life in ways he could not have imagined back then.

“If a future Division 1 football player can be openly gay,” Jake, at the time the popular square-jawed captain of the John Burroughs high school football team, said to those who had assembled, “then so can you.”

With that speech, in which he implored his classmates to be themselves, Jake became an accidental activist determined to change the national conversation about gay youths. His sharpest weapon? Social media, where he receives as many as 50 messages a week from as far away as Australia and from teenagers in countries where it is illegal to be gay.

His life, as it unfolds on the football field and before nearly 13,500 Instagram followers, has inspired many others to come out, their own stories often left in comments on his page. It also has been the focus of taunts and protests, as recently as this month. But Jake’s narrative, at turns harrowing and triumphant, is playing out in heartland towns and conservative state universities across the country, as gay and transgender teenagers emboldened by the power of social media are stepping into the limelight and demanding acceptance and equality.

“Show everyone that it is O.K. to be who you want to be, to love who you want to love,” Jake said in the speech that elicited a standing ovation, wide news media coverage and its own hashtag, #StandWithJake. “Nothing ever changes without people showing that it is O.K. to be different.”

Declaring his difference, though, came at a painful cost. He received anonymous and hateful texts. Ugly insults piled up on Instagram and on the high school football field, with opponents shouting slurs during games. And members of the virulently homophobic Westboro Baptist Church traveled to Ladue, Mo., to picket outside his high school.

In the end, Indiana State University offered him a full scholarship to play football, and gay rights activists joined friends and strangers at a counterprotest that vastly outnumbered those from the Westboro group. Admiring messages began to pour into his social media accounts, eventually exceeding the taunts. And last spring, he attended his senior prom with his boyfriend, both of them wearing tuxedos with matching pink bow ties.

Still, Jake and others like him face formidable headwinds from activists invigorated by the Trump administration’s efforts to roll back transgender and gay rights and a Supreme Court newly dominated by conservatives. Three months ago, the parents of a Division 1 cross-country and track runner on a partial athletic scholarship to Canisius College in Buffalo told her that they would no longer support her after they found photos of her and her girlfriend online. More than 2,400 people donated money to a GoFundMe account, approved by the NCAA, raising nearly $100,000 for Emily Scheck, a sophomore, so that she could stay in school. And earlier this month, the Westboro Baptist Church targeted Jake again, this time on the campus of Western Illinois University as that school’s football team played against Indiana State in their final game of the season. And again, counterprotesters significantly outnumbered them, with more than 100 of Jake’s supporters to the five or so Westboro members.

At 19, Jake has already accomplished a lot. In high school, he scored 41 touchdowns, rushed more than 3,400 yards, led his team to a district championship and one state championship, and was named offensive player of the year for the state of Missouri.

Jake, center, during football practice.CreditA.J. Mast for The New York Times

Jake was born and raised in St. Louis, the son of a white mother and black father. They divorced when he was 2, but football was always part of his family. His grandfather was the head football coach at his high school for more than three decades, and his two older brothers also played the sport there.

As he was growing up, America was changing around him. When Michael Sam, an All-American defensive lineman from the University of Missouri, came out publicly in 2014, Jake’s football coach shared the news as an opportunity to tell his players that he would always have their backs, regardless of their sexuality.

“I was really young when I heard that speech, but I thought if I ever come out, he’d be a good person to talk to,” recalled Jake, who is thinking of becoming a clinical psychologist for teenagers and their families.

But he continued to struggle with his sexuality for years, telling himself it was just a phase. “Had I not have been an athlete, I think I would have come out a lot sooner,” he said. Instead, he hid behind the persona of a stereotypical jock. He dated girls and began going to therapy and taking antidepressants.

“I spent so long acting overly macho, trying to mask who I was, knowing I was living a lie,” he said.

In the summer before his junior year, his secret weighing on him, he quietly told a few close friends, then his family, his coach and teammates. Their support gave him the courage to ask out a red-haired, rosy-cheeked varsity swimmer named Hunter Sigmund, who is now a freshman at the University of North Carolina.

They are still a couple, despite the nearly 700 miles between them. Their shared struggle of coming-of-age as young gay men has motivated Jake to stand up for lesbian, gay, bisexual and transgender rights.

Members of the Westboro Baptist Church targeted Jake during a protest outside Western Illinois University as that school’s football team played against Indiana State.CreditDaniel Acker for The New York Times

Across the country, a record seven current college football players are openly gay or bisexual, according to Outsports, a website that showcases L.G.B.T. athletes. Yet Jake almost failed to make that roster, and his experience may help explain why so few college football players are out. When he was a sophomore, Jake was named Class 3 offensive player of the year in Missouri, the same year his high school won the state title. The following season he became the team captain. College coaches had flocked to Ladue to watch him play.

“After I came out,” he said, “everything kind of went radio silent.”

He said he tried reaching out to the coaches but never heard back, and when his own coach sought to get answers, he was told they had decided to go in a different direction.

Indiana State, though, still wanted him to play. During a campus visit in the summer of 2017, he met with the head coach, Curt Mallory, accompanied by his mother and grandparents. “I told him I’m openly gay and that before I committed, I needed to know if that was an issue,” he recalled. Mr. Mallory told him he would do everything in his power to make sure Jake was accepted.

“We just treat him like everybody else,” Mr. Mallory said in an interview. “He fit right in. I never thought twice about it.”

The traumatic ordeal of publicly coming out made it easier for Jake to be open with his teammates. He sent his future roommate his Instagram profile, which spotlights a mosaic of romantic photos, football game snapshots and gay pride flags. He told the rest of the team over a group chat.

Counterprotesters supporting Jake during the demonstration outside of Western Illinois University.CreditDaniel Acker for The New York Times

“Jake wrote ‘hey guys I’m gay,’” said Chris Childers, 18, a running back from Chicago. “We didn’t believe it at first. It was definitely new for me, but nothing about him being gay will ever affect us being friends or teammates.”

A redshirt this year, like most freshman players on his team, Jake appeared in four games, and recently switched from defense to wide receiver. Over the season, which ended after the team’s victory against Western Illinois, he befriended several of his teammates. They bonded during grueling football practices and over nachos at Applebee’s, where Jake didn’t hesitate to share stories about his boyfriend.

Still, in some ways his sexuality has made him an outsider in the testosterone-infused world of college football and in the middle of conservative Indiana. He avoided showering with his teammates out of concern for what they might think, and he kept his gay pride tees on a shelf and quit wearing his rainbow-splashed “love is love” hat on campus because, he said, “you get stared at.”

He won’t take off two bracelets, though, a rainbow one he got on the day of the first Westboro protest, and geographic coordinates engraved in metal that mark the exact location where he and Hunter officially became a couple. Taking them off, he said, would make him feel like he is hiding a part of himself, and that would be “hypocritical.”

For now, Jake said he has found solace in helping the closeted gay teenagers who contact him on Instagram.

In April, he received a message from a closeted Irish teenager who described the relentless bullying he experienced at his Catholic all-boys school. “I just admire your bravery and I need someone to guide me on what to do,” the boy wrote.

Jake offered some advice and months later, he received a new message: “Jake, one week ago I came out to my family,” wrote the boy, who explained that he had shared Jake’s story with his religious parents, which ultimately helped them accept him for who he is.

“Thank you so much,” the boy wrote. “You were the reason I decided to come out.”