ORLANDO, Fla. — When a bitterly divided Senate confirmed Justice Brett M. Kavanaugh despite sexual misconduct allegations a month before the midterm elections, strategists in both parties anticipated that it could turbocharge Democratic efforts to take over the House, if not all of Congress.

One person who did not get the memo? President Trump.

Rather than falling back on defense amid roiling outrage, especially among women, Mr. Trump is going on offense, trying to turn the furor into an asset instead of a liability. With the world’s loudest megaphone, he hopes to make the issue not the treatment of women in the #MeToo era but the treatment of men who deserve due process.

For Mr. Trump and his Republican allies, this is a big gamble, with control of at least one house of Congress and possibly both on the line. Polls generally show that more Americans believed Christine Blasey Ford, the main accuser, than Justice Kavanaugh. The national mood over the past year has been less forgiving of powerful men accused of taking advantage of women.

The president’s calculation, however, is that conservative voters who for most of the year have been lethargic about the congressional elections can now be motivated to turn out by anger over the Democratic attacks on Justice Kavanaugh. Liberal voters, in this view, were already animated by their opposition to Mr. Trump and likely to vote even before Justice Kavanaugh was accused of sexual assault and exposing himself during drunken school parties, so Democrats have less to gain at this point.