FAIRHOPE, Ala. — Just hours before the polls opened in a special United States Senate runoff in Alabama that will echo through the national Republican Party, two of the best-known figures in President Trump’s orbit raced to the state Monday night on behalf of opposing candidates.

Senator Luther Strange, trailing in the polls but hoping Mr. Trump’s backing can help him close the gap, summoned Vice President Mike Pence to Birmingham to highlight the president’s endorsement as part of a get-out-the-vote push in Alabama’s largest city.

In the same hour, Roy Moore, a former State Supreme Court chief justice, welcomed the former White House senior adviser Stephen K. Bannon to a barn in this community along the Mobile Bay for a rally that mixed praise for Jesus Christ with jeremiads against the Republican establishment.

The contest here to fill the seat vacated by Jeff Sessions, now the attorney general, has grown in significance since Mr. Trump put his prestige on the line by campaigning for Mr. Strange on Friday. With that gamble, the president ensured that this latest proxy fight between the Republican establishment and the party’s populist wing would test his own clout on the right while also shaping primaries in next year’s midterm elections.