The cost of living in the Washington metropolitan area increased more rapidly than in other urban centers and in the nation as a whole during the past year, the federal government reported yesterday.

Steep rises in housing and utility costs here were the principal reasons for Washington's upward cost-of-living spiral. But food prices also went up more rapidly here than nationwide, the Bureau of Labor Statistics reported.

For the 12 months ending in November, the Labor Department agency said, Washington area consumer prices rose 7.8 per cent compared with an average of 6.7 per cent for all U.S. cities and for the entire nation.

The Washington-area consumer price index (CPI) increased 1.4 per cent during the most recent three months compared with 1.1 per cent for U.S. cities.

Labor Department officials said most of the recent CPI increase reflected higher costs for household services, rent apparel, tobacco products and alcoholic beverages.

Food prices rose 0.9 per cent from August to November, following increases of 2.1 per cent and 1.8 per cent during the quarters ended last May and August, respectively. For the year, area food prices rose 8.7 per cent compared with a national average of 3 per cent.

In the three most recent months, the government agency said, prices in this area rose for most bakery products, fresh vegetables, processed fruits and vegetables, salad dressing, fresh milk and coffee. Prices declined for fresh fruits, pork, beef, poultry, salad or cooking oul and eggs.

Over the full 12 months, however, housing and public transportation costs here have increased at the most rapid rate, because of higher mortgage interest rates, utility costs and a restructuring of subway and bus fares.

Gas and electricity prices jumped 18.1 per cent in the year, reflecting higher rates for area utilities approved by state agencies over the past 18 months, compared with a national average increase of 11.9 per cent.

The costs of home ownership in the Washington area, including purchase prices, mortgage interest, taxes, insurance, maintenance and repairs, rose 11.2 per cent compared with 8.6 per cent nationally.

Rents rose by 5.8 per cet on an annual basis, compared with a higher 6.4 per cent national average, in part reflecting rent controls in some ares jurisdictions.

Overall housing costs, including utility bills, account for more than one-third of the average consumer spending dollar. Thus the big jumps in prices for those sectors here have pushed up the overall cost of living.

Prof. Eleanor G. May, of the University of Virginia, said yesterday that Northern Virginia is by far the most expensive area in the state in terms of living costs. Overall, she said, Washington area costs are 14 per cent above the average for eight metropolitan areas in the state.And housing costs here. May added, are 30 per cent above the state average.

Mortgage interest rates here rose gradually throughout 1977, from 8.5 per cent to more than 9.5 per cent on increasingly expensive new and existing houses. In Fairfax and Montgomery counties, new houses now sell for an average of more than $70,000 - up more than 8 per cent in the past year.

One factor in the increased housing costs has been higher local government development and service fees. Sewer and water hookup fees in Fairfax County have increased 195 per cent from 1970 to 1977, for example.

A spokesman for Giant Food, Inc., attributed higher food prices here to greater costs of doing business in this area. More than 19 cents of each dollar spent at Giant goes for workers' wages and benefits compared with a U.S. food chain average of less than 15 cents.