President Reagan, who said before the election that he was opposed to a tax increase next year, appeared to be opening the door yesterday to a 5-cent-a-gallon increase in the gasoline tax to finance rebuilding of the nation's crumbling roads, bridges and mass transit systems.

The president said at his Sept. 28 news conference that no tax increase would be proposed to reduce the deficit next year "unless there's a palace coup and I'm overtaken or overthrown." But yesterday White House spokesman Larry Speakes suggested an increase in the gasoline tax would not violate that pledge because the gasoline tax is not a tax, but a "user fee."

Speakes said Reagan has not decided whether to ask Congress for the increase. The federal gasoline tax is now 4 cents a gallon.

Transportation Secretary Drew Lewis, who also calls the tax a user fee, has been trying for a year to sell the president on an extra nickel a gallon to raise $5.5 billion annually for transportation. Reagan deferred action on the Lewis proposal earlier this year, but it was presented to him again yesterday at a session of the Cabinet Council on Economic Affairs.

The president's apparent willingness to consider it now -- sources emphasized that he did not reject it yesterday -- came as the 5-cent-a-gallon proposal picked up the endorsement of Senate Finance Committee Chairman Robert J. Dole (R-Kan.) and a day after House Ways and Means Committee Chairman Dan Rostenkowski (D-Ill.) said such an increase is a near-certainty. The House Democratic leadership also supports the idea of a 5-cent gasoline tax dedicated to road and bridge work, aides said.

It would be part of the leaders' effort to combat the nation's 10.4 percent unemployment rate. To provide jobs they are proposing public works and housing bills of a kind the president has vetoed before.

"One person must decide whether a job-creation bill is to be enacted," said House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) in a statement. "That person is the president. I hope that he does not frustrate the growing concerns of the American people . . . . "

House Democrats are readying their jobs bill for the lame-duck session of Congress that will begin Nov. 29. Rep. Henry S. Reuss (D-Wis.), chairman of the Joint Economic Committee, yesterday outlined legislation he said would put 600,000 people to work next year building bridges, maintaining roads and mass transit systems and rehabilitating public buildings. The $4.4 billion jobs program would be targeted at communities hardest hit by unemployment.

Reuss also proposed a $3.2 billion housing assistance plan. He would finance these in part by curtailing Reagan's proposed defense buildup.

And in other budget-related jockeying yesterday, Sen. Ernest F. Hollings (D-S.C.) said he will lead a new fight to cut production funds for the MX missile and the B1 bomber in the lame-duck session. Reagan wants to preserve both weapons. [Details on Page A20.]

The highway plan Lewis outlined to the president yesterday would dedicate 4 cents of new revenue to road and bridge repair and a penny for new subway cars and buses. "We have highways and bridges that are falling down around our ears -- that's really the thrust of the program," Lewis told reporters.

But he also said his proposal would directly create 170,000 jobs and indirectly another 150,000 jobs.

As the recession has deepened, Reagan has steadfastly rejected what Speakes called "make-work, dead-end" proposals to create employment, but the White House has been careful not to attach that label to the plan Lewis advanced yesterday.

And one administration official, who asked not to be identified, said that regardless of the administration's original intent, the "timing" of Lewis' proposal was favorable because of the growing chorus of demands in Congress for a response to joblessness.

Yesterday, the president asked for additional details and Lewis returned to the White House later to provide them. But another administration official cautioned that the president had not decided to move ahead with the proposal.

While it has picked up significant support in Congress, the administration and the private sector, the gasoline tax concept is still opposed by budget director David A. Stockman, officials said. They added that there is more resistance to the penny that would be dedicated to mass transit than to the 4 cents for highways.

Stockman has previously argued that the administration should get out of the road-building business entirely.

Dole said in a speech to the Washington Press Club that he hopes the gasoline tax plan can be taken up by Congress in the lame-duck session. "I don't think the president is set in concrete," he said. "I think he's flexible.

"This is the best possible jobs bill that could be devised," Dole said of the idea of a roads and bridges bill financed by a gasoline tax increase. "These new jobs could become available begining as soon as 90 days after enactment of the program."

In the Democratic proposal outlined yesterday, Reuss called for holding the annual rate of growth in military spending to 5 percent after inflation. He also proposed capping the 10 percent tax cut due next July at $700 per return. He said the result of these shifts would be a small deficit savings.