A sharp decline in gasoline prices and the continued effects of the recession helped bring inflation to a near standstill last month, the government said yesterday. The Consumer Price Index rose only 0.2 percent.

The February CPI increase continues a trend of moderating inflation that began last October, as large petroleum reserves and declining economic activity both put downward pressure on prices. A decline in new car prices because of manufacturers' and dealers' rebates and a relatively small increase in home-financing costs also helped hold down the overall figure last month.

Since October, the CPI has risen at a seasonally adjusted annual rate of 4.5 percent, and for the year ending in February, the increase has been 7.7 percent, compared with the double digit rates of 1980.

In metropolitan Washington, however, retail food prices rose 1.8 percent in February, nearly double the average increase for all cities last month. Details, Page D8

The easing of the inflation rate nationwide produced a sharp gain in real earnings last month. Americans' income, after accounting for inflation, rose 1.9 percent in February, the largest monthly gain since 1964, the Labor Department reported.

The February CPI, before seasonal adjustment, stood at 283.4, indicating that a sample "market basket" of goods and services costing $100 in 1967 would have cost $283.40 last month.

"It's the one bit of good news in the economy," said Rudolph Penner, chief economist of the American Enterprise Institute.

The trend is expected to continue until the economy moves out of the recession, and administration economists expressed confidence that much of the improvement in inflation will persist even then.

Robert Ortner, chief economist at the Commerce Department, noted that the index of hourly earnings had risen by 7.5 percent over the past 12 months, compared with a 9.9 percent increase over the 12 months ending in February, 1981.

"We're seeing much more moderate wage increases," he said, citing multiyear contracts reached in the trucking, meat processing and auto industries, which will continue to help restrain inflation in 1983 and 1984.

Negotiators for the United Auto Workers have agreed to a tentative new contract with General Motors Corp. that is expected to hold wage increases to about $3.50 an hour, a 17 percent rise, between now and September, 1984. Had the UAW been able to renew its current contract with auto manufacturers, labor costs could have risen by $5 to $5.50 an hour, industry analysts calculate.

"There is something fundamental going on," Penner said.

However, Leon Taub, Washington economist with Chase Econometrics, estimates that two-thirds of the improvement in inflation since last fall is related to the decline in oil prices, the result of the worldwide oil surplus and the decline in industrial and commercial activity caused by the recession.

Economists are divided on the future course of petroleum prices, but their anti-inflationary impact is likely to weaken as the economy improves. In February alone, gasoline prices dropped 2.3 percent in the CPI, while fuels used for home heating declined 0.4 percent.

Food and beverage prices rose 0.6 percent in February, slightly less than the previous month. Fruit and vegetable prices rose by 1.6 percent, still registering the effects of harsh winter weather on crops, and pork and egg prices were also up sharply.

Prices of apparel and upkeep rose by 0.4 percent last month after a 0.1 percent decline in January, and medical care and entertainment costs both increased 0.7 percent in February.

New car prices fell by 0.8 percent last month, but used-car prices were up 0.5 percent, as car buyers continued to look for bargains.