Mr. Macron met first with a few union representatives from the factory at the local chamber of commerce; Ms. Le Pen beat him to the plant itself.
Mr. Macron said that he could not stop companies from firing workers, but that he would fight to find a buyer for the plant or to retrain workers. Ms. Le Pen promised to save the plant and the nearly 300 jobs there that are supposed to be shifted to Poland next year, and said she would discourage companies from moving jobs abroad with a 35 percent tax on any products imported from plants that are outsourced from France.
One of Mr. Macron’s supporters, the writer and economist Jacques Attali, said in an interview on French television that the case of the Whirlpool factory was an “anecdote,” meaning a detail in the wider context of France’s economy.
“The president of the Republic isn’t here to fix every individual case,” Mr. Attali said.
Of course, it was no detail to the people who work there, and campaign officials for Mr. Macron, who has sometimes been criticized as lacking empathy for working people, had to scramble to distance themselves from the comments.
It was just one example of how Mr. Macron, 39, who has never held elected office and is running against a political veteran, was on the back foot all day.
Ms. Le Pen, 48, praised the Whirlpool workers for “resisting this wild globalization,” and, taking a page out of the populist playbook of President Trump, she promised that the plant would not close if she were elected.
“When I heard that Emmanuel Macron was coming here and that he didn’t plan to meet the workers, that he didn’t plan to come to the picket line, but that he was going to shelter in some room at the chamber of commerce to meet two or three handpicked people, I considered that it was such a sign of contempt for what the Whirlpool workers are going through that I decided to leave my strategic council and come see you,” Ms. Le Pen said at the site.
Mr. Macron, speaking at a news conference after meeting with the union representatives, shot back that Ms. Le Pen would fix “nothing” if elected, arguing that her protectionist proposals would destroy more jobs and that she was “making a political use” of the Whirlpool workers. Still, he announced quickly that he would visit the plant, too.
He arrived at the site surrounded by a giant, jostling scrum of journalists with cameras and microphones as he tried to talk with the crowd of workers around him.
Black smoke from burned tires lingered in the air, and some of Ms. Le Pen’s supporters cried out, “Marine for president!”
“Why didn’t you come before?” one worker shouted at Mr. Macron. “You are in favor of globalization,” another said, critically.
“I didn’t come here to promise the moon,” Mr. Macron replied. “When Marine Le Pen comes here to tell you that we have to leave globalization, she is lying to you.”
The workers did not seem convinced. One man joked that Mr. Macron was a “copy-paste” of President François Hollande, a highly unpopular Socialist who failed to significantly reduce France’s unemployment rate. In the 2012 presidential race, Mr. Hollande sought blue-collar support at a threatened steel plant in Florange in northeastern France, but unions later accused him of betraying them after the plant’s blast furnaces were kept idle.
It was not Mr. Macron’s first tense encounter with union workers or protesters. Last year, he was targeted by egg-throwing union activists in an eastern suburb of Paris, and he famously told a T-shirt-wearing protester in southern France — who had heckled him about his suit — that “the best way to pay for a suit is to work.”
In Amiens, after Mr. Macron was able to leave the crowd of journalists behind a factory gate, he engaged in a more constructive conversation with the workers, broadcast live on his Facebook page and ending with him shaking hands and promising he would return.
But his emphasis on going along with globalization, not trying to stop it, was clearly a hard sell.
Mr. Macron finished ahead in the first round of the presidential election on Sunday, with 24 percent of the vote versus 21.3 percent for Ms. Le Pen, and polls still predict that he will beat her in the second round.
But his campaign for the runoff has gotten off to a shaky start, with critics saying he celebrated too early and returned to the campaign trail too late.
He has also suffered from cracks in the so-called Republican Front, the usually solid phalanx France’s mainstream political parties have traditionally formed to prevent a National Front victory.
One such call came on Wednesday from former President Nicolas Sarkozy, who ran unsuccessfully in right-wing presidential primary contests last year.
Mr. Sarkozy said on Facebook that the results of the vote on Sunday were a “political earthquake” and that he would vote for Mr. Macron because a National Front victory would have “very serious consequences for our country and for the French.”
“It is a choice of responsibility, which should in no case be taken as support for his project,” said Mr. Sarkozy, who noted that France would still have the opportunity to vote for his party, the center-right Republicans, in upcoming legislative elections.
But on the far left, Jean-Luc Mélenchon, who came in fourth with 19.6 percent of the vote, has not endorsed Mr. Macron.
Instead, his France Unbowed movement is organizing an online “consultation” asking supporters whether they plan to vote for Mr. Macron, abstain or vote with a blank ballot.
Mr. Mélenchon’s first-round voters skew younger and more working-class than Mr. Macron’s. Some worry that left-wing voters who supported Mr. Mélenchon will hurt Mr. Macron’s prospects of winning the runoff by abstaining in large numbers.
That is especially true in regions like the one around Amiens, where Ms. Le Pen came in first during voting on Sunday.
At a news conference in Paris on Wednesday, Alexis Corbière, a spokesman for Mr. Mélenchon, said “not one vote must go to the National Front.” But he rejected criticism that Mr. Mélenchon’s attitude was helping Ms. Le Pen.
“It isn’t with absurd admonitions that you are going to suddenly lead people to rally behind Mr. Macron,” Mr. Corbière said. “You have to discuss things, and convince that the National Front vote is not an option.”