At least 50 District of Columbia gasoline station owners -- representing 20 percent of the city's stations -- suddenly closed their pumps yesterday to protest a proposed 6 percent tax on gasoline that the City Council will vote on today.

The shutdown caused confusion and concern during the afternoon rush hour yesterday as motorists circled in and out of stations on New York Avenue and other commuter routes in the city trying to find gasoline.

"I've been to nine stations, this is the tenth one," Fred Baxter as he filled his Delta 88 at an open station on New York Avenue.

Charles Naylor sighed with relief as he pumped gasoline into his Volkswagen Rabbit at another open station. "I didn't want to end up walking," he said.

About 75 station owners and workers flooded the District Building yesterday to lobby against the tax, saying it would drive motorists, away from the city to Maryland where there is no such tax increase.

The council gave preliminary approval to the tax June 17. If given final approval today, the tax would go into effect Aug. 1.

In Virginia, a 4 1/2-cent per gallon tax increase goes into effect this morning.

D.C. City Council member John Ray rushed to prepare an alternative lower tax proposal yesterday, but Council Chairman Arrington Dixon said he felt "comfortable" with the original proposal tax and there appeared to be no sign of strong backing for Ray's plan.

Mayor Marion Barry and other city officials support the new gasoline tax as a way to help solve the city's financial crisis.

It was not clear yesterday whether the protest would spread to other stations or extend into the July 4 weekend, but a Sunoco executive said that 12 of the company's 25 D.C. stations had joined the protest and there was a "groundswell" of support for it among owners.

An Amoco spokesman said most of the company's 45 D.C. stations closed yesterday.

At the District Building, Vic Rashced, executive director of the Greater Washington-Maryland Service Station Association, led a group of owners from office to office to lobby against the tax, Rasheed asserted that if the Council passes the tax today his association will go to court to stop it.

The 6 percent tax would make the District's gasoline tax among the highest in the nation. The 6 percent price of a gallon of gasoline, which levy would be applied to the total now includes 10 cents of local and 4 cents of federal taxes.

It would immediately add 7 1/2 cents to the average cost of a gallon of gasoline at the District's 250 stations, driving the average price to $1.36.2 from its current $1.28.7.

In Northern Virginia today, the price of gasoline at about 500 stations is scheduled to jump 4 1/2 cents a gallon because of new state and regional taxes, driving the average price to $1.33.2.

In Maryland, where there have been no local tax increases, the average gallon should continue to cost $1.27.8 at about 750 stations in the Washington suburbs -- at least until world oil prices again begin driving up local prices.

The new local taxes are coming at a time when gasoline price increases in the Washington area have leveled off. After a series of sharp price increases last fall and early spring, the average price here has gone up only 2 cents per gallon during the past 2 1/2 months, a Washington Post survey shows.

During that time, all grades of gasoline at self-service pumps actually declined in price, the survey shows. At full-service pumps, all grades went up slightly.

Gasohol went against these trends, decreasing slightly in price at full-service pumps and rising slightly at self-service.

Prices are steady because there are ample supplies of gasoline in Washington and the nation just a year after the long gasoline lines of last spring and summer. "There's a gasoline glut," says the current issue of the Lundberg Letter, a respected petroleum marketing publication.

Oil company executives said yesterday there is a glut because world supplies of crude oil have not slackened while at the same time Americans have cut their gasoline consumption 8 to 10 percent from what they were using before the 1979 shortage.

Council member Ray's alternate proposal yesterday was for a flat 4-cent-per-gallon tax increase, raising the local tax from 10 to 14 cents a gallon.

But John A. Wilson (D-Ward 2), chairman of the council's Finance and Revenue Committee, said he believed that tinkering with the tax at this late date could imperil Mayor Barry's entire tax package, which the mayor has said is needed to help avert a projected city budget deficit of up to $170 million this fiscal year.

Wilson said changing the gasoline tax might require public hearings and could delay the whole package at least two weeks. With Congress planning to recess soon for both national political conventions, there might not be enough time before its adjournment on Oct. 3 for the required 30-day congressional review necessary for the law to take effect, Wilson said. The city could thus find itself with no new taxes at all, he said.

The package would increase the general sales tax from 5 percent to 6 percent; subject the now-exempt soft drinks, candy and gum to it's increase the real estate tax from 1 percent to 2 percent; and increase the hotel occupancy tax from 8 percent to 10 percent.

That might mean the council would have to try to enact the tax package as emergency legislation, but a recent court ruling seems to prohibit this.

Ralph Feltman of Lee's Gas and Car Wash on Kenilworth Avenue, who showed up at the District Building yesterday, said the proposed tax would hurt his business. "They're running all my people to Maryland," he said. "I'm two blocks from the line, and 50 to 60 percent of my customers are from Maryland."

Exxon dealer James Williams sat in his station at 400 Florida Ave. NE yesterday, refusing to pump gasoline. "This D.C. tax is going to put me out of business," he said. "People will go to Maryland and Virginia rather than pay it. I'm hanging on by a thread as it is."