In March 2011, President Obama swept onto the stage at the Municipal Theater here to tumultuous applause.

“I met with your wonderful new president, Dilma Rousseff, and talked about how we can strengthen the partnership between our governments,” he told an invited audience.

“For so long, you were called a country of the future, told to wait for a better day that was always just around the corner. Meus amigos, that day has finally come,” Obama said. Both countries had much in common, he added.

Four years later, as Rousseff begins a visit to the United States, it is a different story.

Brazil, whose GDP boomed by 7.5 percent in 2010, is skidding into recession. Inflation is at 8.5 percent. Rousseff has denied knowledge of a multibillion-dollar corruption scandal at the state-controlled oil company, Petrobras, that prosecutors allege involved bribes and campaign donations to politicians and her own Workers’ Party and other allied parties.

Eight months after winning a second term, her approval rating is at 10 percent, according to a June poll by the Datafolha institute. And as her administration forces a controversial package of budget cuts through the Congress, Brazilians wonder whether the golden future that Obama predicted has again slipped from their grasp.

Rousseff’s visit originally was planned for two years ago, but she canceled it after allegations that the National Security Agency had spied on her and on Petrobras. Now Brazil’s contracting economy has made a trip to the United States more imperative.

“A lot of it has to do with the need of the Brazilians for foreign direct investment,” said Carl Meacham, Americas program director at the Center for Strategic and International Studies in Washington.

Rousseff was in New York on Sunday and will spend Monday meeting with bankers and ­investors, helping to sell a ­much-needed $63 billion infrastructure package.

From New York, she flies to Washington, where she will meet with Obama, attend a dinner hosted by the president as well as a State Department lunch with Vice President Biden, who has played a key role in the rapprochement between the two countries.