Mr. Obama, who invited labor leaders to fly with him here on Air Force One, said the “constant war against unions” undermined regular workers. “It reminds me of something our old friend Ted Kennedy used to say,” he said. “What is it about working men and women they find so offensive? Why are they so mad about folks just trying to make a living?”

At a campaign stop later in the day at the Pink Cadillac Diner in Rochester, N.H., during a motorcycle tour of the first primary state, Mr. Walker defended his battle with unions and portrayed Mr. Obama as a tool of entrenched interests.

“It’s clear the president stands with the big-government union bosses,” Mr. Walker said. “We stand with the hard-working people.” He said his actions were “pro-taxpayer” and “pro-worker,” adding: “I think the president and his allies fear us more than anybody else in this race because they know we don’t just talk about it; we get it done. We fight, we win, we actually get results.”

During his speech here, Mr. Obama made no mention of his support for new free trade agreements with Asia and Europe, which has deeply angered many of the union leaders and Democratic political leaders he was addressing. Among those on the dais was Senator Elizabeth Warren, the Massachusetts Democrat with whom he quarreled bitterly in the spring over legislation authorizing him to negotiate trade pacts like one with 11 other Pacific Rim nations.

Led by Ms. Warren and egged on by labor union leaders, most of Mr. Obama’s fellow Democrats voted against him in Congress on the trade negotiation measure, which passed only with the active leadership of Republicans. As he sought to repair the rift on Monday, Mr. Obama emphasized his working-class message after the speech with a stop at Union Oyster House, where he ordered clam chowder to go. He also gave Ms. Warren a ride back to Washington on Air Force One.

The paid leave order is the latest move by Mr. Obama to use his power over federal contracts to institute changes on a small slice of the labor market when he cannot persuade Congress to enact those measures for the whole country. Among other things, he has signed orders requiring contractors to pay higher minimum wages, banning retaliation against workers who discuss their compensation, providing employees more information about their pay and protecting gay and transgender workers from discrimination.

Mr. Obama’s assertive exercise of his authority over federal contactors has generated objections from business groups that argue he is going too far and from lawmakers who complain that he is circumventing the legislative process. Critics say he is piling expensive directives onto companies doing business with the federal government as a sop to his political base without accounting for additional costs.