WASHINGTON — From the armed forces to the air traffic control system, and programs that support everything from needy citizens to research grants, virtually every industry and community that relies on federal expenditures would be hit with spending cuts that would take effect if Congress fails to pass a compromise in the next few days on the “fiscal cliff.”

Negotiators agreed to a stopgap measure that would forestall the cuts for two months, along with raising taxes on the richest Americans. But passage is not certain; the House has yet to vote on the late-night deal. Such a vote is expected Tuesday.

For Massachusetts, the cuts — referred to as “sequestration” — would mean dozens of local government and educational programs could be reduced, including funds from the Low Income Home Energy Assistance Program that helps families heat their homes in winter.

The Massachusetts Municipal Association predicts the automatic cuts could mean slashing $90 million from 35 programs in local governments, schools, and other community projects – including grants to school districts and special education, and to help spur economic development.

“There is no question that going off the cliff is bad news for the country and bad news for Massachusetts,” said Representative Jim McGovern, a Worcester Democrat.

While McGovern noted that food stamps, Medicare, and Medicaid are not affected, “There are cuts that will affect our economy in Massachusetts very deeply. Our teaching hospitals and universities rely on research funding for jobs. That is not protected.’’

Economists fear the reductions will batter an already shaky American economy — leading to layoffs and possibly shaving as much as 5 percent off the nation’s economic output this year if the budget cuts are not modified.

The cuts, totaling $1.2 trillion over 10 years, were scheduled to take effect as part of the Budget Control Act of 2011. The reductions would be across-the-board, with no ability for agencies to target or protect particular programs.

Vice President Joe Biden and Senate negotiators came up with a tentative deal that would push the cuts back while broader deficit reduction and tax reform talks ensue.

A detailed analysis by the White House Office of Management and Budget issued in September concluded that nearly all federal agencies will be affected by the automatic spending cuts.

The National Institutes of Health, which provides significant funding to Bay State hospitals and universities, would lose $2.5 billion this year, according to the analysis.

The Food and Drug Administration, meanwhile, could experience a more than 8 percent cut nationally to its $3.9 billion annual budget.

Federal rental assistance for the poor would be reduced by $2.3 billion and nutrition programs for low-income women and children are set to lose nearly half a billion dollars.

The border patrol budget could take a hit to the tune of $823 million, according to the OMB study.

“This sequestration ... would have destructive effects on national security; on important domestic investments such as education, research and development, and rebuilding the nation’s crumbling infrastructure; and on core government programs from air traffic control to law enforcement,” according to a statement from OMB issued before Christmas.

The cuts would also take place outside of American borders. The State Department would lose more than a billion dollars in 2013 at a time when members of both parties are calling for more funding for security at US embassies and consulates around the world.

The military would take the biggest hit — more than a $50 billion this year. Unless reversed, nearly half of the total spending cuts over the next 10 years would fall on the Pentagon.

In a memorandum to Pentagon employees and military personnel last week, Secretary of Defense Leon Panetta said the military would be able to maintain its current expenditures for a limited amount of days but would have to operate with substantially less money through the remainder of the fiscal year that ends in September unless Congress comes up with a long-range solution.

“Should we have to operate under reduced funding levels for an extended period of time, we may have to consider furloughs or other actions in the future,” Panetta wrote.

Defense contractors, including several with large facilities in New England, are raising alarms.

The Aerospace Industries Association, which represents military contractors, said layoffs will be unavoidable if defense cuts are not overturned.

“Our elected leaders must come up with a solution to sequestration — 2.14 million American jobs depend on it,” Marion Blakey, the group’s chief executive, said in a statement. “The clock is ticking; the longer we wait to address sequestration, the worse the damage will be.”

But not everyone thinks deep cuts to the Pentagon budget would be bad.

“If no deal is struck and the defense sequester is triggered, the reductions could help discipline and prioritize Pentagon initiatives,” the National Security Network, a nonpartisan Washington think tank advocating defense reforms, said on Monday.

The group also noted out that the White House analysis pointed out that the Department of Defense will have “flexibility to implement Pentagon reductions in a manageable and gradual way.

Other specialists also said that federal agencies would have some breathing room.

“Each agency that is affected by it have three months to identify the cuts and another month to prepare for them,” said Robert Khan, a senior fellow in international economics at the Council on Foreign Relations in New York.