For Republicans who have found themselves at odds with President Trump or his policies, there have generally been just two options: Buckle, as former deficit hawks did on the recent tax bill, or give up entirely, as two senators did in deciding to retire.
But Gardner — who also heads the campaign operation charged with hanging on to the Republicans' Senate majority — is becoming known as someone who will do more than posture when he and the Trump administration disagree.
The latest and most striking example came Thursday, when Gardner, 43, announced that he will stand in the way of every nomination the Justice Department sends to the Senate. Late last year, he and Trump were in opposition over the Senate race in Alabama.
"Cory didn't look for a fight in either case. It came to him, and he responded vigorously. And to me, that's the model," said Rep. Tom Cole (R-Okla.), who knows Gardner well.
His latest move came in protest of Attorney General Jeff Sessions's new policy allowing federal prosecutors to crack down on the marijuana industry — a reversal of Obama administration policies and a blow to states such as Colorado that have legalized cannabis despite federal law against it.
"This reported action directly contradicts what Attorney General Sessions told me prior to his confirmation. With no prior notice to Congress, the Justice Department has trampled on the will of the voters in CO and other states," Gardner tweeted.
His position is undoubtedly beneficial to his own political situation, given the popularity of legal marijuana in his home state, a battleground where he will be facing reelection in 2020.
While Colorado defies any party label, it has a strong libertarian streak. In 2012, it became one of the first two states to legalize pot for recreational use; a year later, voters there recalled two state senators who had voted for stricter gun laws.
Although he has a staunchly conservative voting record, Gardner, a former Senate staffer and state lawmaker, has proved skillful at navigating his state's tricky political terrain.
His 2014 campaign ads touted him as "a new kind of Republican." After Gardner's victory over incumbent Democrat Mark Udall, Bloomberg News dubbed him "a Purple Superhero." Meanwhile, he maintains a demeanor so cheerful that Washington Post columnist George Will once described him as a "human sunbeam."
"He's a very substantive senator, but he's also a very politically savvy senator," said former Colorado GOP chairman Dick Wadhams. "Frankly, he will suffer some backlash from loyal Trump Republicans for doing this, but Cory looks at the bigger picture."
Gardner also took the opposite side from Trump and the Republican National Committee in last month's contentious Senate election in Alabama, a contest that sharply divided the party.
After GOP candidate Roy Moore was accused of sexual misconduct toward teenage girls, there was an initial rush by the party to distance itself from its own nominee.
But after Trump endorsed Moore, the RNC resumed its financial aid to the candidate — something that Gardner, as chairman of the National Republican Senatorial Committee, refused to do.
"You're seeing a very able politician position himself personally on issues that are important to his state. And both the marijuana issue and the issue of sexual harassment are going to be pretty important in a swing state like Colorado," Cole said.
Although his Alabama stance put him at odds with both the president and the national party organization, "it didn't matter to me. There was no amount of pressure that would have changed my decision, because it was the right thing to do," Gardner said in an interview.
Still, some of his Republican colleagues resented the high profile he took against Moore, particularly when Gardner vowed to move for Moore's expulsion from the Senate if he were elected.
It made the situation more awkward for other Republicans, one party strategist said. "He put a lot of people in a bad spot."
If Gardner's position on Alabama caused problems for other Republicans, so has Sessions's stance on pot — because it divides social conservatives from libertarians, both of whom are essential parts of the GOP base.
Use of legalized marijuana threatened as Sessions rescinds Obama-era directive that eased federal enforcement
Gardner's counterpart at the Democratic Senatorial Campaign Committee, Sen. Chris Van Hollen (D-Md.), pointed to Gardner's outspokenness as a sign that there could be a budding bipartisan coalition to resist Sessions's directive, which Van Hollen also opposes.
"This may be an area where you have common cause between some Democrats and Republicans," Van Hollen said in an interview with The Washington Post and Politico on C-SPAN's "Newsmakers."
Gardner was also one of the earliest Republicans to criticize Trump for not singling out white nationalists as the culprits for violence last summer in Charlottesville that led to the death of one counterprotester.
"Mr. President — we must call evil by its name. These were white supremacists and this was domestic terrorism," Gardner wrote in a tweet at the time.
In the interview this week, Gardner said he is focused on following the will of voters back home — and the dictates of his own conscience.
"What I'm concerned about is the people of Colorado, doing what's right for them. And issues of standing up against accusations of child molesting in Alabama or up against racism and bigotry," Gardner said. "I'm going to do what's right, and it doesn't matter who is in the White House."
Before agreeing to vote to confirm Sessions, Gardner recalled, he had demanded assurances from the nominee that the administration would not move against Colorado's marijuana industry. Though Gardner had personally opposed legalization, he said, he believed the will of Colorado voters should be respected.
Sessions assured him "that the Trump administration simply didn't have this on their agenda," Gardner recalled. "They didn't have room for it, they didn't plan on doing it and that Trump honestly wasn't there."
When asked about that discussion, senior Justice Department officials declined to comment.
Gardner has been in touch with Sessions again after announcing his plan to oppose the department's nominees unless it relents on changing the marijuana policy.
"Let's just say, there was no reconciliation of differences," the senator said. "We are going to have a conversation next week."
Meanwhile, Gardner is likely to be embroiled in another tense situation with the Republican White House soon.
He and fellow Colorado Sen. Michael F. Bennet, a Democrat, are co-sponsors of the Dream Act, which would grant legal status and a path to citizenship to immigrants who were brought to this country illegally when they were children. One in 5 Coloradans is Hispanic.
Trump, however, has rescinded an Obama-era program — Deferred Action for Childhood Arrivals, or DACA — that shielded those young immigrants from deportation.
Democrats have made restoring the program a top priority; Trump has said he will not do so unless he also gets funding for the border wall that was one of his signature campaign promises.
Gardner said that a compromise may be possible — but that it will require the Trump administration to get more heavily involved in the negotiations and to be clear about precisely what it wants.
"I think there is a bipartisan path to provide border security, to move forward on a solution for children of a very young age brought here through no fault of their own," he said. "I don't think this is a zero-sum game. I think there is common ground for a victory."