Mr. Farage, the former U.K. Independence Party leader who helped lead the “Brexit” movement, campaigned for Mr. Trump in the presidential election and was the first foreign politician to meet with him after he won. As president-elect, Mr. Trump suggested that Britain appoint Mr. Farage as its ambassador to the United States, an idea that was quickly dismissed by the British government.

The Alabama race to fill the Senate seat vacated by Attorney General Jeff Sessions pits Mr. Moore, an evangelical favorite, against Luther Strange, who has the support of Mr. Trump and Mitch McConnell, the Senate majority leader. Mr. Strange was appointed to the Senate this year after Mr. Sessions left.

The runoff has put the candidates’ supporters into the tricky position of trying not to offend the other side. Mr. Trump has said he would campaign for Mr. Moore in the general election if he wins. And Breitbart News, the far-right website led by Mr. Bannon, cast Mr. Farage’s visit to Alabama on Monday as an effort to deliver a setback to Mr. McConnell, not the president.

Mr. Trump has wagered his political capital on Mr. Strange, traveling to Alabama on Friday to campaign with him and speak at a rally. Establishment Republicans have told Mr. Trump that Mr. Strange would be a more dependable vote in the Senate than Mr. Moore.