Tom Steyer, the billionaire investor and Democratic activist, has directed his political operation to spend more than $5 million aiding Andrew Gillum's campaign for governor of Florida, an enormous investment that will test whether fired-up Democratic voters can flip control of a state long dominated by Republicans.

The campaign between Mr. Gillum, who is the progressive mayor of Tallahassee, and Representative Ron DeSantis, a conservative lawmaker who has aligned himself closely with the White House, has become one of the clearest contests of strength nationwide between the Democratic Party's rising liberal wing and the Republican Party as President Trump has reshaped it.

Mr. Steyer, who is based in California and has crusaded since last year for Mr. Trump's impeachment, said in an interview that he would spend more money in Florida this fall than any other state. He endorsed Mr. Gillum, 39, in the Democratic primary, and hailed him as a model for the national Democratic Party. In the interview, Mr. Steyer praised Mr. Gillum for having endorsed impeachment, though he said that had not been a "litmus test" for his support.

"He's a fierce gun control person, he's been a climate champion," Mr. Steyer said of Mr. Gillum, adding: "He's called for the impeachment of the president. He's been willing to talk plainly to Florida voters, and they've responded."

Mr. Steyer, 61, said his spending in the state would be geared heavily toward mobilizing young people and minorities to vote, rather than courting undecided voters in the political center, whose existence he said he questioned.

"I don't even accept this idea, if you'll excuse my saying this, of voters in the middle," Mr. Steyer said.

Mr. Gillum has held a slim lead over Mr. DeSantis in public polls since the Florida primary last month, and Mr. DeSantis has struggled to move past a series of racial controversies involving him and his political supporters. The morning after the August 28 primary, Mr. DeSantis warned on Fox News that Floridians should not "monkey this up" by electing a liberal like Mr. Gillum, in what many took as a racial slur against a candidate who would be Florida's first black governor. He described it as an inept turn of phrase.

But Florida has not elected a Democratic governor this century, and Mr. Trump remains more popular there than in the country as a whole. And Mr. DeSantis has benefited from a powerful infusion of funds by national Republican committees. The leading group among them, the Republican Governors Association, has committed to spending some $20 million for Mr. DeSantis, and has already been running ads branding Mr. Gillum as "too radical" for Florida and linking him to a federal investigation of influence-trading in Tallahassee. Mr. Gillum has said he is not a target of any investigation.