If the government shuts down Monday night, America’s national security and intelligence agencies will be operating with less staff, and the risk of an attack or other national security incident will go up, according to officials and experts.

“If we experience a partial shutdown, the intelligence community’s ability to identify threats...