The D.C. City Council gave preliminary approval last night to Mayor Marion Barry's package of new and increased taxes, including a rise in the general sales tax from 5 to 6 percent and a new 6 percent tax on gasoline that will add about 8 cents a gollon to the price at the pump.

The council also approved the mayor's revised 1981 budget, a cost-saving measure that reduces by $63 million Barry's original spending proprosal for next year. That budget calls for cutting the number of city police officers by 204 through layoffs and attrition, eliminating one firefighting company, laying off hundreds of other city employes and curtailing some city services.

The tax package, which passed unanimously on a voice vote with one member absent, will come up for final approval July 1. The council is considering passing the bill as an emergency measure at that date, so the new and increased taxes can take effect as soon as the city's merchants can alter their cash registers and gas pumps -- probably within 30 days.

The new tax measures are designed to stave off, in part, a $172 million operating deficit this fiscal year by generating $15.6 million in new income by Oct. 1. The increase in the current sales tax rate is expected to account for $5.2 million, while the new 6 percent tax on the price of gasoline is expected to bring in $2.3 million. Since it taxes the price of gas at the pump, the proposed 6 percent tax is, in effect, a tax on a tax. The pump price already includes 14 cents in federal and local taxes.

In addition, an increase in the hotel occupancy tax from 8 to 10 percent approved last night is expected to raise an estimated $3.7 million; a one percent rise in the tax on real estate transfers $3 million; and an increase in the personal business property tax, $1.7 million.

The gasoline tax has become one of the most controversial provisions of the new tax package. Yesterday afternoon, Councilman Jerry Moore (R-At-Large), who was not present at last night's meeting, issued a statement saying he was "surprised and shocked" by the proposed gas tax which he said "does little to remedy the present financial crisis."

Last night, members of the Greater Washington and Maryland Service Station Association appeared at the council meeting and told reporters they were mobilizing opposition to the new tax. "We beat the president on his 10 cents-a-gallon tax," said Bill Brooks, association treasurer. "We thought that after we beat the president the mayor would relax his 6 percent tax." Brooks and the proposed tax "will drive people to the suburbs" to buy gas.

The version of the tax plan passed by council last night is only slightly modified from the tax package the mayor originally wanted. The council did choose to include, after committee hearings, a new 6 percent sales tax on candy, soda pop and chewing gum, while excluding a tax on tickets to entertainment events.

The Barry administration had said all the new tax must be in place by July 1 in order for the city to avert or alleviate the anticipated deficit this year. But Carolyn L. Smith, head of the city's finance and revenue department, said the administration needs 30 days after passage of the measure in order to develop collection systems for the new and increased taxes. m

Smith said the city will lose $3.4 million for each 30-day period past July 1 that the taxes are not in effect.If the council passes the entire plan as emergency legislation at its July 1 meeting, the new taxes will not get collected until Aug. 1, costing the city $3.4 million. Unless passed as emergency legislation, the measure will be subject to congressional review, resulting in an additional 30-day delay before it can become effective.

In earlier action last night, the council passed a bill to regulate condominium conversions in the District, in most cases allowing conversions only when a majority of the tenants in the building approve.

Under the bill, elderly persons with annual incomes up to $30,000 can continue to rent their apartments for the rest of their lives, even when their buildings are converted to condominiums.

The condominum bill will become law after the 30-day period required for congressional review. The bill will replace the current condo conversion moratorium which expires Aug. 1.

Many council members later voiced reservations about the new bill. But the council was up against the August expiration date and intense political pressure caused by the rapid increase in conversions in the last few years.

The existing temporary moratorium that the legislation would replace was passed last year as a way to stop the expansion of conversions and give the council time to enact permanent legislation.