An old-fashioned turf fight between two powerful House committees is holding up extension of the venerable but financially troubled highway trust fund and threatening a cutoff of federal highway money to about 20 states.

The primary players are Rep. James J. Howard (D-N.J.), chairman of the House Public Works and Transportation Committee, which authorizes highway programs, and Rep. Dan Rostenkowski (D-Ill.), chairman of the House Ways and Means Committee, which raises money to pay for them.

An attempt by the House Rules Committee to find a compromise failed yesterday.

The Ways and Means Committee is concerned, a source said, that the Public Works panel, not known for its restraint, will authorize more highway projects than it has money for. "Then we will have to come back and raise taxes to pay for them," the source said. So Ways and Means has proposed, in effect, that it review highway projects before financing them.

Nothing is more sacred to the Public Works Committee and Howard than the right to authorize roads and bridges. "They're trying to take all my jurisdiction away," Howard said. Any attempt to force him to compromise, he said, means he has to give away something he and his predecessors have always had.

Other Public Works Committee sources cited the memory of former House Speaker Sam Rayburn, who decreed when the highway trust fund was started in 1956 that the panel would authorize the program and Ways and Means would raise the money.

That was fine when the trust fund was collecting more in gasoline taxes, at 4 cents per gallon, than even road builders could spend.

In recent years, inflation has driven up the cost of highway construction while gasoline consumption has leveled off, reducing the buying power of the gasoline tax. In the last three years, the trust fund has spent more than it has collected, and its once comfortable balance is disappearing. The trust fund is authorized through fiscal 1984 so, although there would not appear to be a problem, there is because highway contracts are awarded several years before bills must be paid.

Therefore, as Rostenkowski explained, the trust fund balance and estimated revenues for the next two fiscal years will not cover the $19 billion in outstanding highway authorizations and a new authorization of $9.5 billion for fiscal 1983.

Under the formulas through which highway money is distributed, officials estimate that about 20 states would receive no new money in 1983 and that other states would receive far less than what they are expecting. Precise figures are not available.

"I don't know why we have to get caught up in this," an exasperated official at the Federal Highway Administration said.

"They should extend the trust fund for one year, then spend next year solving their jurisdictional problems."

Transportation Secretary Drew Lewis is expected to seek White House approval to push for a multiyear highway program that would feature a "user fee" equivalent to a 5-cent-a-gallon increase for gasoline. His proposal for the same thing this year was rejected by President Reagan.