BERLIN — Leaders from Chancellor Angela Merkel’s coalition agreed Monday on a raft of changes to social welfare programs aimed at easing costs for average Germans to bolster the government’s sagging popularity less than a year before parliamentary elections.

Germany, Europe’s strongest economy, can easily afford the measures. But they come at a time when Merkel has been pressing Germany’s struggling European partners to slash public spending, underscoring just how uneven the economic outlook is across the continent.

The measures include scrapping an unpopular quarterly medical fee, increasing spending to improve transportation infrastructure and introducing a bitterly disputed child care subsidy. Overall, they are expected to cost $3.9 billion a year. In contrast, the Greek Parliament will be voting Wednesday on yet another round of austerity measures, this one worth $17 billion — equal to 7 percent of gross domestic product — to meet the demands of international lenders standing between Greece and sovereign default. Unions have announced a series of strikes and protests against the cuts that will decimate the country’s already stretched social services net. The most immediate criticism, however, came from Merkel’s political opponents, who denounced the largesse as an expensive attempt to woo voters before next year’s election, in which Merkel will run for a third term.

“Ms. Merkel and Mr. Schaeuble preach to the Europeans to drink water, but at home they are enjoying wine,” said Sigmar Gabriel, chairman of the center-left Social Democratic Party, referring to Finance Minister Wolfgang Schaeuble. That party, along with the opposition Greens, have threatened legal steps against the child care subsidy.

Nine years ago, Germany pushed through its own deeply unpopular austerity measures. They helped steel the German economy against the global economic downturn of 2008. Now, while Greece, Spain and other European economies crumble, Germany has a vigorous labor market that has contributed to record tax revenues for 2012, of about $783 billion. Schaeuble said last week that the jump in tax revenue would allow the country to balance its budget next year, but the coalition leaders set that target for 2014 — which is still two years earlier than required by law.

While the picture for Germany is not entirely rosy, the country’s relative riches have prompted calls for the government to spend more itself and act to spur private consumption — an uphill battle with citizens who prize saving over spending.