The Washington area's six major local governments, saddled with mounting Metro costs and suffering from declining federal and state aid, will face a total revenue shortage of $605.3 million by the 1987 fiscal year, according to a new study released yesterday by the Greater Washington Research Center.

The study, prepared by a task force headed by former World Bank president Robert S. McNamara, projected that revenues would increase an average of 6.4 percent a year while spending would rise an average of 8.6 percent a year.

In what its authors describe as the first comprehensive look at local government finances, the study paints a bleak but manageable five-year fiscal picture for governments in Washington, Alexandria and Arlington, Fairfax, Montgomery and Prince George's counties:

Cities and counties probably will be forced to lay off more employes, while government spending barely keeps pace with inflation. User fees or local taxes are likely to rise to meet the skyrocketing cost of the Metro transit system, including subway construction.

Federal aid will continue to shrink, and Virginia and Maryland will squeeze the area even more by gradually redistributing the available state aid away from more affluent communities, such as those around the Beltway, to less affluent areas, the report says.

The District of Columbia, Fairfax and Prince George's would be hardest hit by the projected spending gap, while Alexandria, Arlington and Montgomery would suffer less.

"We're projecting a real substantial drop in revenues, in real terms," McNamara told reporters at the Mayflower Hotel yesterday morning, after releasing copies of the task force study. "State laws in Virginia and Maryland and the Home Rule charter in the District require balanced budgets. So the question is, how will the gap be closed?"

That question may be most perplexing to officials of the District of Columbia, who, the study says, will face a revenue shortfall of $109 million this fiscal year that will grow to $257 million by 1987.

Mayor Marion Barry acknowledged in a letter to the D.C. City Council last Friday that the city is facing a "potential problem" of a $110.4 million deficit in the fiscal year that began Oct. 1. However, he pledged to balance the budget without laying off city employes or reducing basic services such as police and fire protection and education.

In Northern Virginia, Fairfax County's projected budget gap will grow from $18.5 million this fiscal year to $152.4 million in fiscal 1987, according to the study. In contrast, Alexandria will experience shortfalls ranging from $2.4 million to $21.3 million during that same period and Arlington will incur projected shortfalls ranging from $2.4 million to $10 million.

In Maryland, Prince George's can expect revenue gaps ranging from $27.2 million this year to $94.6 million in fiscal 1987, according to the study, while Montgomery's projected shortfall will range from $15.2 million to $69.9 million in the same period.

Overall, the report says, local government spending will increase from $4.4 billion this fiscal year to $6.6 billion in 1987, while revenues during the same period are likely to rise from $4.4 billion now to just under $6 billion.

"There aren't any easy answers where increases in revenues will come from, but we think the $605 million gap is not unmanageable if we address the problem now," said McNamara, the former secretary of Defense who headed the year-long task force study.

He said that no more than half the projected gap, or $300 million, could be made up with further reductions in local government spending. Better long-range financial planning and innovative approaches to delivering services can help also, he said.

Except for a potentially controversial proposal to increase Metro rider fees sharply, the task force declined to make specific recommendations on how local governments could raise the needed additional local revenues.

"We haven't either recommended or stated an expectation with respect to property taxes," McNamara said. But, he added, "Something has got to give. You can't do it with mirrors."

The task force study did offer a series of recommendations for ways local jurisdictions could save money over the next five years.

The D.C. government could reduce its projected revenue gap by $87 million if it continues a trend of reducing its workforce by 2 percent a year, according to the study. Another $55 million could be saved if the city could avoid assuming full responsibility from the federal government for operating St. Elizabeths Hospital for the mentally ill.

The study said that Fairfax County could pare $37 million from its projected 1987 shortfall if it freezes its nonschool employment at 1982 levels and an additional $11 million could be saved by holding down employes' health benefit costs.

The task force acknowledged, however, that other jurisdictions may have difficulty finding ways to close the projected gaps other than by increasing taxes and user fees.

McNamara said that local governments throughout the country typically have attempted to close budget gaps by skimping on maintenance and capital improvements and by using various accounting gimmicks "to put off the day when the gap must be confronted."

"That need not happen here," he said. "The gaps can be identified in advance and ways can be found to deal with them."

In reviewing pension programs, the task force projected that area governments will increase their pension contributions by nearly 44 percent over the next five years -- from a total of $388 million this year to $557.8 million in 1987.

For the most part, the assets of those pension plans are equivalent to between 40 percent and 75 percent of the accrued liabilities, the study found. "This is roughly comparable to other large public pension plans around the nation, although lower than the 70 to 120 percent generally found in private sector plans," the study stated.

However, the study noted that the District government, with its unique history of federal government ties, has only recently begun to build substantial funds and is carrying "very large unfunded liabilities."

The Greater Washington Research Center, a nonprofit think tank, apppointed the 27-member, blue-ribbon task force in May 1981 to analyze and forecast Washington-area local government finances and to recommend specific, politically feasible ways governments can perform more efficiently with less money.

Philip M. Dearborn, a vice president of the research center and former financial adviser to Mayor Marion Barry, supervised preparation of the revenue and expenditure projections. The center is expected to release additional studies on water and sewage, education, labor costs, housing, health and welfare and economic development over the next several weeks.