GDANSK, Poland — Mitt Romney arrived in Poland on Monday for two days of talks with Polish leaders and received the endorsement of a former president, Lech Walesa.

The Republican presidential candidate is set to meet Tuesday with Polish Foreign Minister Radoslaw Sikorski and deliver a speech before returning home after a three-nation trip that was designed to boost his foreign policy resume.

Hundreds of cheering Poles greeted Romney when he arrived at the old town hall in Gdansk, a port town that was the birthplace of the Solidarity movement. Walesa, who led the antigovernment movement in the 1980s, suggested that the United States needs Romney’s leadership to restore its standing in the world.

‘‘I wish you to be successful because the success is needed to the United States, of course, but to Europe as well and to the rest of the world, too. So, Governor Romney, get your success,’’ Walesa said through a translator.

The endorsement was not without controversy. Campaign officials said the visit with Walesa came at his invitation, but the current leadership of Solidarity distanced itself from the event and issued a statement critical of Romney.

Solidarity characterized Romney as being hostile to unions and against labor rights. It emphasized that the organization had no role in organizing Romney’s visit and expressed support for American labor groups.

The Romney campaign hopes Walesa’s backing will influence Catholics and labor union members in the United States.

‘I can only guess what Vladimir Putin makes of the Obama administration.’

But Representative Marcy Kaptur, Democrat of Ohio, told reporters the Polish visit ‘‘is nothing more than a superficial diversion and a desperate attempt to pander to Polish Americans and Catholics across our country.’’

Romney also met Monday with Poland’s prime minister, Donald Tusk, and other top officials.

During that meeting, ‘‘Romney expressed gratitude for Poland’s friendship and their people’s history of assisting the US to defend our freedom,’’ according to the Romney campaign.

The campaign said Romney ‘‘in particular cited Poland’s sacrifice in Iraq and Afghanistan.’’ The group also discussed the European economic crisis and efforts to build up democracy in neighboring countries.

Romney laid a wreath at a memorial in Gdansk, honoring Polish soldiers at the spot where they battled invading German soldiers in the first engagement of World War II in Europe. He has said in the past that President Obama has been too timid in dealing with Poland’s historic enemy, Russia.

In a speech last week to the Veterans of Foreign Wars in ­Reno, Romney accused the president of caving in to Russia’s demands on missile defense and leaving Poland more vulnerable.

Obama, Romney said, was guilty of ‘‘the sudden abandonment of our friends in Poland and the Czech Republic. They courageously agreed to provide sites for our antimissile defense systems, only to be told at the last hour that the agreement was off . . . I can only guess what [Russian President] Vladimir Putin makes of the Obama administration.’’

Poland sees missile defense as a way to guard against a possible return of Russian aggression, and it eagerly agreed to the missile shield proposed by President George W. Bush.

The announcement by the Obama White House that it would not move forward with the plan came on Sept. 17, 2009, 70 years to the day after the Soviet Union invaded Poland, two weeks after Nazi Germany attacked from the West.

A month later, Vice President Joe Biden said the United States would proceed with a smaller project on the same basic schedule. But there is concern that the missile system may not be deployed because of uncertainty about budget cuts.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.