Country singer Gabby Barrett stopped by her manager’s office in Nashville last month when she saw some camera equipment that she learned was set up for her. She sat in front of a screen, not entirely sure what was going on, and then Taylor Swift’s face appeared.

Turns out, Swift was a surprise presenter for the CMT Music Awards, which were partially prerecorded because of pandemic restrictions. Swift recorded a brief clip to announce that Barrett, 20, had won the award for breakthrough video of the year for her debut single, “I Hope.”

Barrett was stunned that (a) one of the biggest stars on the planet just casually presented her an award, and (b) that she won in the first place. She could barely collect her thoughts to give an acceptance speech. “It was a big bowl of insane in the best way,” Barrett said. “I can’t really even put it into words. It didn’t feel real.”

The unexpected moments keep piling up for Barrett, who has become an anomaly on multiple levels: “I Hope” has grown into a certified smash as it shatters streaming records for country music, which has lagged behind other genres on streaming platforms. And Barrett, the third-place finisher on “American Idol” Season 16 in 2018, proved that a reality singing competition — one that premiered nearly two decades ago — can still help launch a successful music career.

“I Hope,” a scorching anthem to a cheating ex, went No. 1 earlier this year and earned further Nashville cred this fall with a nomination for single of the year at the Country Music Association Awards, airing Wednesday on ABC. Barrett, who also landed a “new artist of the year” nod, is up against Nashville’s A-list talent in the single category, including Luke Combs, Miranda Lambert, Maren Morris and Dan + Shay featuring Justin Bieber.

The song was the fourth track Barrett co-wrote when she started making trips to Nashville after “Idol” — it started in a writing session with Zach Kale and Jon Nite on Halloween in 2018. They suggested writing a breakup song where a guy cheats on a girl, but she still feels hopeful and genuinely wishes him well.

Barrett may have been the novice in the room, but she had one piece of feedback: absolutely not. She went through a similar situation in high school and knew that was not a realistic response. So they employed a twist, as the lyrics start out with the narrator sweetly wishing her ex all the happiness in the world — and then putting him on blast in the chorus: “And then I hope she cheats, like you did on me.”

Right before she left that day, Nite — who has written songs for Luke Bryan, Keith Urban, Tim McGraw and others — told her, “I think this may be the biggest song of my career.” She didn’t believe him: “This man has written so many hits.”

Then “I Hope” took off at a rate no one expected. Unsigned to a label, Barrett worked with her management company to release the song on streaming platforms in early 2019. It started to skyrocket in sales and streams, and eventually caught the attention of multiple record labels. She signed a deal with Warner Music Nashville several months later.

The song hit the top of the country charts this past April, but it made an impression on people outside Nashville, one of whom happened to be pop star Charlie Puth. Shortly after the United States began imposing stay-at-home orders because of the pandemic, canceling all of Barrett’s upcoming shows and a summer tour with Brad Paisley, Puth messaged her on Instagram.

He said something along the lines of, “This is amazing. I haven’t heard a song like this in years. I have to remix this,” Barrett recalled. Once she confirmed it was really Puth (she saw the verified check mark but didn’t quite believe it), things happened quickly. Puth lent his vocals to the second verse, and the “I Hope” remix took off across pop music, leading to huge numbers as it became a crossover hit. (They perform the song together Wednesday at the CMAs.)

In May, a month before she released her debut album, “Goldmine,” Barrett became the first female country singer to earn more than 10 million streams in a week; then “Goldmine” became the highest-streamed debut album for a country act. Although country music streaming has increased during the pandemic, the genre’s listener numbers are generally much lower than other formats’. “I Hope” has only continued to climb, going triple platinum and sitting at No. 5 on the Billboard Top 100, highly unusual for a country song.

The staff of Billboard recently sat down to analyze the success of the song. “I might not have predicted that it would climb all the way to the Hot 100 top 10,” editor Katie Atkinson wrote. “That’s massive — especially for an ‘American Idol’ alum in the year 2020.”

While “Idol” has launched country stars in the past, from Carrie Underwood to Scotty McCreery to Lauren Alaina, it has become much more difficult to break out from TV show when singers on YouTube and TikTok can go viral and find success at a much faster pace. Barrett was cognizant of this when she placed third and was required to go on an “Idol” finalist tour across the country.

She didn’t want to lose momentum, so she reached out to Underwood for advice. Underwood explained that if Barrett really wanted to attempt a country career, she had to get to Nashville and start writing original songs, no matter how grueling the schedule. So on her one day off a week from the “Idol” tour, Barrett started taking redeye flights to Music City. The hours paid off, as in those early days, she wrote “I Hope” and several other songs that ended up on her album.

“ ‘Idol’ was such a huge highlight in my career. Even if it’s not the end all be all, it’s a big part of my journey,” Barrett said. “Two years later, people still message me, saying, ‘I just watched your performance of [Miranda Lambert’s] ‘Little Red Wagon’ on ‘Idol’ and I love it’ … It’s really nice to see people stick with you.”

Barrett, a Pittsburgh native, was 17 when she auditioned for “Idol” — she was recruited by a producer who saw one of her performance videos online. Barrett has been singing since she was 11 years old, and even though it has been frustrating to be sidelined in a pandemic during a breakout year, she’s trying to appreciate the time at home. In May, she found out she was pregnant, about seven months after she married fellow “Idol” contestant Cade Foehner.

In that sense, a forced timeout from the road was fortuitous. “I’ve never had this long of a break from music in my life,” she said. “I used to have this mind-set, ‘Be productive or else someone else is being productive and you’re not.’ But there’s also a gift in taking a break, which is something I figured out this year — I’m very thankful I can sit back and soak in all the things that are happening.”

Read more: