President Obama criticized Michigan’s Republican leaders during a visit to a Detroit-area auto plant Monday for advancing a new “right-to-work” bill, saying it would hurt workers’ ability to bargain for better wages.

Obama had traveled to Daimler’s Detroit Diesel facility as the company announced plans for new technology and expanded production at the 74-year-old plant. The $100 million investment will add 115 jobs to the 2,200-member workforce.

Obama’s remarks included another call on Washington Republicans to act swiftly to prevent an increase in income tax rates for most Americans that would be triggered by the so-called fiscal cliff, the latest example of his post-election plan to rally public support for his plan.

But Obama, who won a second term in part due to the organizational might of labor, also weighed in on the effort backed by Republican Gov. Rick Snyder and the state’s GOP-led legislature to make Michigan the 24th state to enact legislation that would bar unions from requiring that workers pay dues.

PHOTOS: The best shots from the 2012 campaign

Snyder surprised many in the state by supporting the last-minute effort to pass the so-called “Freedom to Work” law in the waning days of the legislative session. He said it would help the state compete for jobs by letting investors “know that Michigan is the place to do business.” Supporters say it was all the more important after Indiana passed similar legislation earlier this year.

But Obama, who earlier greeted Snyder after touching down in the state, said “right to work” laws have nothing to do with economics, and “everything to do with politics.”

“We should do everything we can to keep creating good middle-class jobs that help folks rebuild security for their families,” Obama said to Daimler workers. “What we shouldn’t be doing is trying to take away your rights to bargain for better wages and working conditions.”

“What they’re really talking about is giving you the right to work for less money,” he said.

Snyder earlier met with Democratic members of Michigan’s congressional delegation, who urged him to veto the law when it reaches his desk.

QUIZ: How much do you know about the fiscal cliff?

Obama said that though Americans were enjoying the end of the long campaign season, the one thing he missed was an excuse to leave Washington “and talk to the people who work so hard every day.” He hailed the planned expansion of the Daimler plant as evidence of progress in the nation’s economic recovery, and reprising his campaign’s one-word theme, he said, “We need to keep going forward.”

When it comes to the fiscal cliff talks, Obama maintained that he was “willing to compromise a little bit,” but held firm on raising tax rates on wealthier Americans.

“That’s a principle I won’t compromise on because I’m not going to have a situation where the wealthiest among us, including folks like me, get to keep all our tax breaks and then we’re asking students to pay higher student loans,” he said. “We’re not going to do that. We’re not going to make that trade-off. That’s not going to help us to grow.”

On Sunday Obama met with House Speaker John Boehner (R-Ohio) at the White House, the first one-on-one meeting since the election. Neither side offered details of the encounter beyond saying it was an indication that the “lines of communication remain open.”

PHOTOS: President Obama’s past

White House spokesman Jay Carney told reporters Monday that Obama believes an agreement can be reached, but said Republicans still must offer more specifics on how they’d achieve new revenue.

“The president is the only party that has put forward a plan that has specificity on both the spending and revenue side,” he said.

Follow Politics Now on Twitter and Facebook

Michael.memoli@latimes.com

Twitter: @mikememoli