— Headlining the annual “Laborfest” rally here Monday, President Obama joined with prominent union leaders in an effort to mobilize a critical part of the Democratic base with just over two months until the midterm elections.

The president, who first spoke to the gathering when he was running for the White House in 2008, said the recent economic recovery came through the efforts of American workers.

“And I’ve come back to Laborfest to say because of your hard work, because of what we’ve been through together, that bet is beginning to pay off,” Obama said, adding that the economy has created 10 million new jobs over the past 53 months. “And the question now is, are we going to make the right decisions to accelerate this progress?”

Obama’s visit to the highly polarized state — where Gov. Scott Walker (R) is facing a tough reelection fight — underscored the importance of the labor movement in several key Senate and gubernatorial races this year. Unions remain at the core of the Democratic voter mobilization effort, which is particularly important during an off-year election.

Republicans such as Walker have managed to chip away at union membership in their states by changing organizing rules for public-sector employees, energizing labor activists. Unions are a notable factor in gubernatorial contests in Wisconsin, Florida, Pennsylvania, Maine and Michigan. Labor groups could also influence Senate races in Alaska, Colorado, Iowa, Kentucky, Michigan, New Hampshire and North Carolina, along with the balance of power in several state legislatures.

President Obama delivers remarks at Laborfest 2014 at Maier Festival Park in Milwaukee. (Jonathan Ernst/Reuters)

Mike Podhorzer, political director for the AFL-CIO, said state-level fights over the past four years mean that “the level of enthusiasm for voting is pretty high” among labor advocates.

“Union members understand what’s at stake in their states with this election,” Podhorzer said.

Obama and congressional Democratic leaders have highlighted several top policy priorities for union members over the past year, including raising the minimum wage, providing paid sick leave for employees and passing comprehensive immigration reform. In January, Obama signed an executive order raising the minimum wage to $10.10 per hour for workers on new government contracts; he called again for a federal minimum-wage hike during his weekly radio address Saturday.

Five labor leaders joined the president on Air Force One for at least part of his Monday trip, including the presidents of the United Steelworkers and the Service Employees International Union. Obama did make one gesture toward bipartisanship on arrival in Milwaukee, greeting both Walker and Milwaukee Mayor Tom Barrett, a Democrat who sought to defeat Walker three times.

The president has no plans to campaign in red-state battlegrounds such as Arkansas, Louisiana and North Carolina, where he is seen as a liability to incumbent Democratic senators seeking reelection. But he plans to travel repeatedly to the Rust Belt and other states where he can rally working-class Democrats.

Walker is running roughly even with Mary Burke, a former Trek Bicycle executive and state commerce secretary, and is a top target for the nation’s most influential unions, including the AFL-CIO, the American Federation of State, County and Municipal Employees and the National Education Association.

SEIU President Mary Kay Henry, who attended Monday’s Labor Day rally with Obama, said in a telephone interview that her group’s members “are thrilled” that he decided to travel to Milwaukee.

“I think he makes a huge difference in making the case to the communities that matter in terms of deciding this election and motivating them to get out this fall and vote,” Henry said.

Obama received a warm welcome from the crowd of about 6,000 on a sunny afternoon as he talked about how Republicans “oppose almost everything.” When the audience booed, the president replied, “Don’t boo — vote. It’s easy to boo. I want you to vote.”

While most labor leaders remain closely aligned with the administration, some have clashed over health-care and environmental policies. Unite Here and the Laborers’ International Union of North America have argued they need exemptions under the Affordable Care Act so their members are not penalized for their self-funded, nonprofit health coverage, while LIUNA also has criticized the president for delaying approval of the Keystone XL pipeline, which would ship oil from Canada to the U.S. Gulf Coast.

“The fact that Democrats feel the need to rally labor voters shows they’re facing an uphill battle this election,” Kirsten Kukowski, spokeswoman for the Republican National Committee, wrote in an e-mail. “The Democrat base is not enthusiastic to vote and labor unions and labor voters have become increasingly frustrated with President Obama. President Obama’s problems with unions should cause Democrats everywhere to worry.”

Obama was not the only Democrat appealing to union voters on Monday. Vice President Biden spoke at the Labor Day parade in Detroit, while Sen. Mary Landrieu (D-La.), who is in a tight race, spoke at the Greater New Orleans AFL-CIO’s 16th annual Labor Picnic.

In a slew of key states, the percentage of voters from union households has shrunk dramatically over the past several elections, according to national exit polls. In Wisconsin, the proportion fell from 32 percent in 2000 to 21 percent in 2012. Similar declines have taken place in Illinois, Michigan, Missouri, Nevada, Ohio and Pennsylvania.

Democrats have expanded their advantage among union voters, according to those same exit polls. In 2000, the labor vote split 55 percent for Democrats and 39 percent for Republicans, compared with 66 percent and 33 percent in 2012.

Few other Democratic constituencies boast the financial resources and field operations of major unions, which have invested heavily in targeting persuadable voters. The AFL-CIO, which has 14,000 local union political coordinators, targets its own members and their working-class neighbors. The SEIU conducted a major drive to register Americans under the new health-care law and has used those contacts as a base for its voter mobilization effort.

“This is the skeleton and the muscle of the modern Democratic Party,” said conservative activist Grover Norquist, who hosted a panel at this year’s Conservative Political Action Conference meeting that focused on targeting public-sector unions as a way of “Turning Blue States Red.”

Norquist said if Republicans can end the practice of compulsory dues among public-sector unions — which he called “stolen money” — it could debilitate Democrats “because they’ve structured themselves around this funding source.”

Steve Rosenthal, a longtime Democratic activist and former political director of the AFL-CIO, said Republicans are keenly aware of what “unions bring to the table.”

“For the right wing in many states, the labor movement is the main obstacle they face in terms of getting to the end zone,” he said.

There are some clear limits to labor’s influence. Unions no longer are focused on defeating Ohio Gov. John Kasich (R), given his Democratic opponent’s weak performance, and they are less active in Senate races in the South, where they have fewer members.

While labor officials typically focus their message on core economic issues, they are broaching topics such as immigration reform and race relations as well. Henry said her members are talking to their “co-workers, neighbors and friends” about the recent shooting of Michael Brown by a police officer in Ferguson, Mo.

“It has sparked a level of activism that we think is directly related to how we register, activate and turn out a vote in November,” Henry said of Brown’s shooting.