Assailants believed to be leftist guerrillas attacked the main headquarters of El Salvador's National Guard today after the virtual disintegration of the Central American country's 80-day coalition government.

The assault here in the capital and the murder of a former police chief in a nearby town followed a threat made by guerrillas yesterday to make 1980 a year of violence against the remains of El Salvador's government.

The latest crisis in the increasingly polarized and violence-torn country of 5 million people began with the resignations on Wednesday and Thursday of at least 37 high-ranking government officials. Among them were the two most liberal members of the five-man civilian-military ruling junta and all but one member of the Cabinet.

The third civilian junta member resigned today to "facilitate" a reorganization of the junta and Cabinet, sources reported tonight.

El Salvador has long been considered nearly as volatile politically as was Nicaragua until the overthrow of the Somoza dictatorship there in July.

At that time, the U.S. government took an increasingly firm stance against El Salvador's military rulers and was quick to voice its support of the junta that took over after the right-wing president, Gen. Carlos Humberto Romero, was over-thrown in October by military moderates.

Leftist allegations of a U.S. role in the coup were denied in Washington.

This week's collapse of the junta's Cabinet came as a result of the military's failure to allow promised political and economic reforms, according to outgoing Cabinet members. It was hoped that the reforms would defuse the bloody conflicts between left and right. Aggravating the conflicts is the gap between a small, wealthy oligarchy that has ruled with the military's support and vast numbers of impoverished peasants and workers.

Jose Napoleon Duarte, head of the moderate Christian Democratic Party who returned to El Salvador in October after seven years of exile, told reporters yesterday that the mass resignations would push the country into civil war.

Guerrillas of the Popular Liberation Forces had briefly seized six key radio stations to announce their plans for stepping up the level of violence and call for a popular uprising.

No groups immdeiately claimed responsibility for today's assault on the National Guard headquarters but it was commonyl believed to be the work of leftist guerrillas. At least two attackers reportedly were killed and two soldiers injured.

The initial attack, which came soon after dawn, was followed by a military "cleanup" operation and sporadic gunfights through the streets near the guard's headquarters in the residential northeast section of the city.

In Santa Ana, about 40 miles west of the capital, leftist Popular Liberation Forces guerrillas atacked the home of retired Lt. Joaquin Luna, the town's former police chief, who died in hail of machine-gun fire.

It was ostensibly to end such violence that young, centrist colonels Jaime Abdul Guitierrez and Adolfo Arnoldo Majano ousted Gen. Romero in October.

The Colonels brought Guillermo Ungo, head of the social-democratic National Revolutionary Movement and Catholic University rector Roman Mayorga into their junta, along with businessman Mario Andino. Ungo and Mayorga resigned Thursday, and Andino was reported to have followed today.

Leftist militants who had been battling with the old government initially called a truce with the new one in October. Violence again began to escalate sharply, however, as promise of major reforms went unfullfilled.

Leftists charged that demands for increased salaries were unmet, an agrarian reform program not implemented, and, most importantly, military and police officials accused of repression and human rights abuses were neither removed nor punished.

Particularly offensive to the leftist was the appointment of Col. Jose Guillermo Garcia as defense minister. He had been in charge of a military unit charged with human rights abuses under Romero's government. Garcia is reportedly the only member of the junta's 11-man Cabinet not to have resigned this week.

[In Washington, a State Department spokesman said, "We are watching the situation. We continue to support reforms while recognizing that challenges to the government of El Salvador continue to be serious."]