President Reagan has received a new top-level intelligence report that U.S.-backed government troops in El Salvador have seized the offensive and the initiative from leftist guerrillas.

Administration officials described the general tone of the report as "cautiously optimistic" about the government forces' long-term chances. But the assessment assumed, according to the officials' description of the report, American "consistency" in continuing to supply economic and military aid, equipment and military training.

The report also warned that rebel forces will probably soon make a dramatic counterattack or some other attention-getting action, possibly including attacks on American advisers in the embattled country, in an attempt to regain credibility.

The inter-agency analysis, prepared under CIA direction with Pentagon and State Department participation, was delivered to the president some time within the past two weeks, according to administration officials.

White House policy-makers were "encouraged" by the CIA report and a separate assessment by military officers assigned to the White House who travel frequently to Central America. Their report reached similar conclusions.

The separate White House assessment was made after the CIA report arrived at the White House, sources say, in part because some officials initially were concerned that the administration might become too euphoric over the CIA assessment.

The military report, however, reportedly backed the general CIA findings, but placed additional emphasis on the likelihood of some new surprise attack by the guerrillas.

Officials said the reports were read in the White House as signs that administration policy was working and was beginning to pay "a return on the investment" of millions of dollars in economic and military aid, military training and stepped-up diplomatic activity.

The officials, who let it be known that there was now a "clear consensus" within the intelligence community that government forces "are on the offensive and have seized the initiative," clearly hope that this will bolster the case for congressional approval of administration aid requests.

One official who visits the region frequently contended that the situation had improved dramatically since last year. Both the CIA and White House reports attribute the improvement to several factors.

These include continued training of Salvadoran troops by U.S. Army specialists; reenlistment bonuses; a more aggressive defense minister, Gen. Eugenio Vides Casanova, who took over in April; adoption of small-unit tactics and seven-day-a-week operations as opposed to a more leisurely pace of battle in the past, and "civic action" programs that reduce military abuses of the civilian population.

There is little dispute here that government forces have seized the initiative in recent months, moving with force back into provinces that were once guerrilla strongholds, such as San Vicente and Usulutan in the south.

But as reports from the region by Washington Post correspondents and others also have pointed out, it is not clear whether the guerrillas have been pushed back or chose to fade into mountain retreats to await the right moment to strike back.

Intelligence officials said privately in recent interviews that it is highly likely that the improved performance of the 25,000-man Salvadoran regular army has knocked the 6,000 or so armed guerrillas off balance and made it harder for them to coordinate their actions and regroup. A demonstration that the government forces can hold territory and keep the pressure on will have important impact, they said.

But they also said that it is not clear that the government has really taken a toll on the guerrillas yet in terms of knocking men and equipment out of action.

It is widely expected here, however, that the guerrillas will have to do something soon to regain their credibility and support as a fighting force, both within El Salvador and among their backers in communist eastern Europe, Cuba and Nicaragua. That is why there are now official warnings within the Reagan administration to expect some dramatic new guerrilla action soon.

One official contended that there is "evidence" to support the warnings, presumably intercepted communications traffic from Cuba and Nicaragua directing the guerrillas to undertake such actions.

Sources said it was possible that the guerrillas would attack American trainers or facilities, try to shoot down an American plane, attack leading Salvadoran government figures, or launch highly visible hit-and-run military attacks throughout the country. They said that security has been tightened but some such attacks are hard to guard against.

White House officials say they fear that such tactics, remininiscent of the 1968 Tet offensive in Vietnam, will cause a "hysterical reaction," as one official put it, among congressional critics of administration policy. They worry that it could lead to even stronger efforts to cut off or sharply reduce military aid to El Salvador.

Officials say that virtually all the $81 million fiscal 1983 military aid appropriation for El Salvador is now spent. The White House will have to go back to Congress by Oct. 1, when the current fiscal year ends, to at least try to keep that level of funding while the new fiscal 1984 budget is requested and debated.

Officials said they expect rebel attacks between now and Oct. 1.

Aside from the improved performance of the Salvadoran military, U.S. officials say other factors are contributing to the loss of initiative among the guerrillas forces and perhaps some confusion and nervousness within their ranks.

These factors include alleged dissension among guerrilla factions, public statements by Cuba and Nicaragua concerning negotiations under some conditions, pressure for a negotiated settlement by the Contadora group of nations--including Columbia, Panama, Mexico and Venezuela--and stepped-up U.S. diplomacy.

Yesterday, the State Department announced that Richard B. Stone, President Reagan's special envoy to Central America, will return to the region Sunday, stopping first in Honduras.

Stone's mission is to promote talks between the Salvadoran government's peace commission and the leftists that would lead to leftist particpation in elections.

But Stone, during his last trip to the region, also met in Colombia on July 31 with Ruben Zamora, leader of an organization that represents the major guerrilla organizations.