For 25 years the federal role in transportation grew as the government built the interstate highway system, took over the failing northeast railroads, helped rebuild mass transit and kept up the air routes and the waterways.

Now, in one of the least noticed but most basic proposals in his budget, President Reagan would reverse this and shift many of these costs to the states and to users.

To the consternation of governors, the transportation industries and, to some extent, even his own transportation secretary, the president's budget would:

* All but remove the federal government from highway building, where it has been preeminent since the establishment in 1956 of the Highway Trust Fund and the interstate construction program. The trust fund has poured $81.9 billion into road building.

* Require the 40 busiest airports to pay for expansion and maintenance entirely from fees they impose on landing airplanes (and thus travelers), instead of relying on an Airport Trust Fund that was established in 1970 and has kicked out almost $3 billion in construction aid.

* Force local and regional transit systems to rely on much higher fares or local tax increases to stay in business. In the past decade, more than $13 billion in federal capital grants and $1.2 billion in federal operating aid was doled out to these systems as public agencies took them over from private owners who had allowed them to go to seed. The administration would eliminate all operating aid and substantially cut capital assistance.

* Eliminate all subsidies for Conrail, the federal railroad created primarily to maintain freight service in the northeast when the Penn Central and other lesser lines failed in the mid-1970s. The budget reconciliation bill of last session stipulated that Conrail be sold in the private market. To help assure it is sold, Conrail was ordered to drop by next January the money-losing commuter passenger service it also operates. This minor part of the Conrail business is of major importance in New York and Philadelphia, where thousands of commuters use Conrail facilities every day.

* Cut the subsidy for Amtrak's passenger trains by $210 million and require states to pick up a larger share of the bill for Amtrak-operated commuter trains. Amtrak was created by the government primarily to continue long-haul passenger service as railroads got out of this money-losing business in the 1960s. The new Amtrak Act, pushed through the last Congress, requires the railroad to cover half of its costs with revenues and permits it to eliminate some service without congressional approval, a first. "This time I believe the debate will not be over who's going to lose the train, but cost," an insider said.

No one understands the problems in all this better than Transportation Secretary Drew Lewis.

Lewis likes the idea of getting the federal government as much as possible out of the transportation business, but feels that, at least in the highway and transit areas, state and local governments lack the money to do the construction and maintenance the nation requires. He is thus trying hard to get a 5-cent-a-gallon-at-the-pump increase in the federal gasoline tax. Partly to sell the president on it, he is calling it a user fee.

The president has turned down the idea once, just before the budget was published, but Lewis has gotten White House staff approval to keep the issue alive while Congress begins developing its version of the budget.

"If I don't get it," Lewis said, "as I see it, we're going to be sitting here with a tremendous deterioration of the highway system and inadequate funds for the capital improvements needed for mass transit."

"Lewis has a very delicate situation there," said a lobbyist with good connections on Capitol Hill and in DOT. " . . . If he gets too far out front, the president could chop him off at the knees."

By pushing the user-fee concept as the financing mechanism for highways and transit, however, Lewis is in tune with a major theme of the Reagan budget: the user pays.

The budget proposes four user-fee programs in transportation: a new aviation user fee (from ticket and freight taxes and taxes on aviation fuel) to buy a new $10 billion air traffic control computer; fees from boat owners to reimburse the Coast Guard for boat licensing, inspection and search-and-rescue operations; and an increased waterway and navigation user fees to help the Corps of Engineers rebuild locks and dams and dredge ports.

All of those are controversial, and all have been proposed or even enacted in one version or another in the past. But the biggest dollars and "Lewis has a very delicate situation . . . If he gets too far out front, the president could chop him off at the knees." potentially the biggest controversy are in highways and transit, because the venerable highway trust fund must be renewed this year.

The Reagan budget proposes to continue the existing 4-cent-a-gallon gasoline tax, send 2 cents of it to the "New Federalism" trust fund that would in turn finance most existing federal highway programs as they were dealt off to the states, and use the rest for a minimal continuing federal highway program that would concentrate on completing the unopened 2,000 miles of the interstate system.

Eight of the 12 transportation programs the administration has earmarked as candidates for return to states are existing highway programs; the rest are in transit and airports.

The budget proposal "doesn't work, period," said Rep. James J. Howard (D-N.J.), chairman of the House Public Works and Transportation Committee and the shepherd of the last big highway bill in 1978. "Those numbers just don't add up." Lewis, he said, has showed the committee figures indicating that "they can't even complete the interstate and maintain it with the full 4 cents."

So if 2 cents goes to the federalism trust fund, that leaves only 2 cents to do something that can't be done with 4. What Lewis would do with his proposed 5-cent increase (bringing the total federal gasoline user fee to 9 cents per gallon) is devote 4 cents to highways and the remaining penny to transit capital expenditures--meaning new buses and reconstruction of old subway systems.

Lewis has been able, so far, to win support from most of the highway lobby for the transit component in the trust fund. He explained his reasons in a December letter to budget director David A. Stockman. "I strongly believe that making additional funds available for capital investment in mass transit is an essential element of this proposal," Lewis wrote. "Rehabilitation and improvement of existing bus and rail transit systems, which provide primary access to the central business districts of our larger cities, is much less costly than constructing or improving new urban freeways to expand peak-period auto capacity. Transit improvements will benefit highway users . . . . "

A number of studies have been done in the past five years to define the highway problem; the most recent, from the American Road and Transportation Builders Association, defined a $262 billion need by 1990.

Although the interstate highway system is nearing completion, many of the miles built in early years are wearing out and need to be replaced. Bridges are also falling apart, as travelers across the Woodrow Wilson can testify. The Federal Highway Administration estimates that it would cost $41.1 billion to replace or rehabilitate the more than 200,000 deficient bridges.

When maintenance problems are put together with a reasonable construction schedule, there is general agreement among road interests that the country needs a federal highway program approaching $13 billion in each of the next 10 years just to stay even.

The administration is proposing to spend $8 billion next year.

That money will come from the Highway Trust Fund, once hale and hearty, now sick. The trust fund has spent more than it has taken in for two years now, and a once-comfortable balance is shrinking.

This has happened because the trust fund's primary revenue source, the per-gallon gasoline tax, has not been increased and has been totally unresponsive to inflation. Meanwhile, Americans were buying less gasoline while highway construction costs, responding to inflation, were shooting up. The cost of road building has jumped 57.3 percent in the last four years alone.

Meanwhile, out in the state capitals, the same problem. The per-gallon gasoline tax was no longer raising enough money to even match federal funds, much less support a solid state maintenance program. Last year, 40 states considered gas tax increases to cure that problem, and 20 of them actually passed increases. Both the Maryland and Virginia legislatures are wrestling with that issue in their current sessions.

State transportation departments, in general, do not have a problem with proposals that reduce the number of federal highway categories and let the states decide what the priorities should be for their road money. The absence of money, however, is another matter.

"I understand the problem," Lewis said, "so I have to come up with the revenue sources to correct the problem, or at least let everybody know what the problem is. If they want to decide that there will be no bridges, that is also a determination."