A key D.C. Council committee unanimously approved yesterday a slightly modified version of Mayor Marion Barry's tax package that would increase the general sales tax from 5 to 6 percent and add at least 8 cents to the cost of a gallon of gasoline.

If the new tax proposals pass the full council, as expected, the 6 percent sales tax will increase the cost of all items already taxed and, for the first time, apply to candy, soft drinks and chewing gum.

In addition, the revenue package would increase the present hotel room tax from 8 to 10 percents and impose a new 6 percent tax on the price of gasoline at the pump. That means gasoline prices which now average about $1.28 a gallon -- including 14 cents in existing federal and local taxes - would increase at least 8 cents per gallon.

The package of new and increased taxes passed yesterday by the five-member Finance and Revenue Committee most likely will go before the full council at its scheduled meeting next Tuesday. Committee Chairman John Wilson (D-Ward 2) predicted the tax package will pass the full council "so quick it's incredible."

Yesterday's committee vote brings to an end a showdown between Mayor Barry, who wanted the package in place by July 1 to avoid a budget deficit this year, and Wilson, who delayed action on the package to win concessions on the city's fiscal 1981 budget.

Wilson has been sharply critical of the mayor's handling of the city's finances, which now include an accumulated deficit of $284 million carried over from the 1979 fiscal year and an expected $172 million deficit for the current year. Wilson complained that Barry was not sharing with the council all the information necessary for his committee to vote on the new taxes.

The tax package was just one part of Barry's overall financial plan to reduce this year's anticipated deficit.The other parts of the plan include a $50 million cost-cutting program, $40 million in U.S. Treasury loans and a supplemental federal payment of $61.8 million.

Already, key congressional committees have recommended a supplemental federal payment of only $29.8 million, virtually assuring a real city budget gap of at least $30 million. The late council action on the tax package could make the real deficit even larger.

The earliest the tax plan could now become law is Tuesday, June 17, and city finance officials say they need at least 30 days to develop collection systems for the new taxes. "Look at the calendar," Carolyn L. Smith, director of the Department of Finance and Revenue, said yesterday. "There's not 30 days between June 17 and July 1."

Moreover to make the law effective June 17, the council would have to pass it on an emergency basis. Otherwise, a "second reading" approval two weeks later would be required, as well as a 30-day congressional review as a 30-day congressional review period, which coming at a time when Congress is expected to take a summer recess, could mean the legislation would not be effective until early fall.

Council Chairman Arrington Dixon said yesterday that he is considering the possibility of voting on the tax package as emergency legislation. But Wilson and others said they would oppose that.

Smith said the city would lose $3.4 million in revenue for each month beyond July 1 that the tax plan is not in effect.

"We never said we were going to avoid a deficit by passing this tax package," Smith said yesterday. "Passing the tax package will only mitigate the problem."

The largest single revenue raiser in Barry's tax package -- an increase from $1.83 to $2.13 per $100 of assessed value in the tax rate on commercial properties -- was not acted on yesterday. That proposal, expected to raise $7.4 million, will be formally submitted and acted on later.

The largest item in the package approved yesterday was the 20 percent increase in the sales tax and its extension beyond generally sold retail goods to so-called junk food.

The inclusion of such food items -- most other food will remain exempt from the general sales tax -- was done to avoid applying the tax to admission prices to public events such as plays, movies and concerts.

Many of the performing arts events are subsidized by the city government. "The arts community is depressed at this point," and fears that increased taxes would discourage attendance, Wilson said.

As amended, the sales tax would bring in $5.5 million by Sept. 30, council aides said.

The deed recordation-transfer tax would raise $3 million, the increased hotel tax would raise $3.7 million, and an additional $1.7 million would be brought in by increasing the tax rate on personal business property -- equipment, machinery and the like -- from $2.82 to $3.10 per $100 of assessed value.

District gasoline prices could be the highest in the area with the imposition of the 6 percent sales tax, which amounts in part to a tax on a tax. If the price of gasoline reaches, for example, $1.50 a gallon -- as some say it could early next year -- the city tax would nearly equal the proposed 10-cent-a-gallon "conservation fee" proposed by President Carter that was rejected by Congress last week.

The sales tax is generally considered a regressive tax because it is not based on the ability to pay. As such, it is often felt to be punitive toward the poor.

In an effort to offset such adverse impact on the poor, Barry had proposed a new income tax credit ranging from $3 to $5 per family member, for families with incomes under $15,000 a year.

Yesterday, however, the council committee rejected the exemption, claiming that persons in that income groups seldom file itemized tax returns.

'People at that low level in most cases don't even file and it won't get to them anyway," said council member Betty Ann Kane (D-At Large).

By rejecting the tax credit and extending the sales tax to include candy, soft drinks and chewing gum, the committee said an additional $300,000 would be raised.

In a related development yesterday, Del. Walter E. Fauntroy (D-D.C.), introduced legislation in the House that would increase the city's federal payment by linking it to the amount of taxes collection each year by the city.

Currently, the city gets a federal payment no higher than $300 million a year an never knows how large a payment it will get as part of its $1.5 million annual budget until late in the fiscal year.

The formula proposed by Fauntroy would add more predictability to the amount of the payment from year to year and could boost it to an estimated $350 million, based on current city revenues.

A hearing on the proposal was set for next Wednesday on Capitol Hill.