Video: Associated Press

President Obama castigated House Republicans for failing to perform a basic function by not providing money for the government. He said a shutdown would harm the economic recovery.

“The idea of putting the American people’s hard-earned progress at risk is the height of irresponsibility and doesn’t have to happen,” he said. “Let me repeat that: It does not have to happen. All of this is entirely preventable.”

Mr. Obama urged Republican lawmakers not to make “extraneous and controversial” ideological demands in exchange for keeping the federal government open, and said the impact of a shutdown on Tuesday would be harmful to millions of Americans.

“One faction of one party in one house of Congress in one branch of government doesn’t get to shut down the entire government,” Mr. Obama told reporters at the White House on Monday afternoon. “You don’t get to extract a ransom for doing your job.”

The president scolded opponents of the Affordable Care Act for insisting that the law be delayed or rolled back. He said that it will eventually provide affordable insurance to millions of people who have lived in fear of huge medical bills.

He said that the insurance marketplaces where people can shop for new coverage will open for business on Tuesday regardless of what Congress does. And he bluntly told critics of the law that they will not win in their crusade to undo his signature achievement.

“An important part of the Affordable Care Act takes effect tomorrow,” Mr. Obama said. “That funding is already in place. You can’t shut it down.”

In remarks that took about ten minutes, Mr. Obama sought to describe the painful impact of a government shutdown, not only on federal employees but also on people who depend on services that the government would stop providing.

He said that Social Security recipients will continue to receive their checks and that Medicare patients will still be able to be seen by their doctors. Mail delivery will continue and essential personnel in the military, air traffic control booths, prisons and border patrols will stay on the job.

But he said that NASA will shut down “almost entirely” except for mission control operations dedicated to the astronauts on the International Space Station. He said federal office buildings will close, parks and monuments will be shut down, and veterans will find their support services unstaffed.

“Hundreds of thousand of these dedicated public servants who stay on the job will do so without pay,” Mr. Obama said. “These Americans are our neighbors. Their kids go to our schools. They are the customers of every business in this country. They would be hurt greatly.”