House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass) yesterday held out the threat of a special post-election session if Congress goes home without passing an energy package.

It was the first time O'Neill had acknowledged the possibility that Congress can't wrap up the energy bill and other essential measures before adjourning early in October to permit members to campaign for election.

But President Carter, who sent Congress an energy package 15 months ago as his top domestic legislative priority, and O'Neill, who put his prestige as new speaker on the line in his first big effort to push the bill through the House, face the possibility that major parts of it not only can't be enacted by October but also will be rejected by Congress.

House-Senate conferees have agreed on three relatively non-controversial sections to try to save oil and reduce reliance on imports. But Carter's proposed tax on domestic crude oil, which he called the centerpiece of his program, is generally considered dead.

The natural gas pricing compromise, which conferees thought they had agreed to, is on the verge of falling apart.

O'Neill told a news conference that at the weekly meeting between Carter and congressional leaders there was talk of the "dire need" of an energy bill and concern expressed by Senate Majority Leader Robert C. Byrd (D-W.VA) that Congress might adjourn without passing an energy package.

Asked if he considered the three parts agreed to by conferees - coal conversion, utility rate chances to save energy and a catch-all conservation program - an adequate energy bill. O'Neill said he considered them only "a quarter of the package."

He said he has not written off chances of passing the natural gas agreement, which would remove federal price controls from newly discovered gas by 1985. "After 14 months of high hopes, I'm not going to quit overnight. I'll let you know when it's dead," he said.

O'Neill said there's been no talk by leaders of a special session after the congressional elections. But, when asked if there were no energy package, "Would you come back for that?" He answered: "I would say we would."

The crude oil tax, which the House passed but the Senate rejected and some former supporters have turned on as a regressive sales tax, appears beyong saving. O'Neill and others involved are concentrating on trying to save the natural gas compromise, which Sen. Henry M. Jackson (D-Wash.) insists will save 1 million barrels of oil a day by producing more gas.

Jackson calls the natural gas dispute the most difficult bill he has been involved in during 38 years in Congress. Conferees haggled for six months before reaching an agreement in principle between the House-Carter position of continued regulation and the Senate vote to deregulate after two years. Now, three months later, the agreement has been reduced to writing, and some members don't think parts of it accurately reflect their agreement.

The next job is to get a majority of the conferees from each body to sign the conference report. Without that, here is no bill to send back to House and Senate for final approval.

Jackson expressed confidence that a majority of Senate conferees will sign the compromise, but is not as optimistic that a majority of the Senate will vote for it.

The House conferees may be more difficult. Their approval of the compromise in May was by a single vote, 13 to 12.One of the 13, Rep. Henry S. Reuss (D-Wis), sounds as though he will refuse to sign. He calls the written document "more anticonsumer and pro-inflation" than the agreement in principle he voted for three months ago.

And in May one of Reuss' main concerns was to give Carter something, almost anything, that he could take to the economic summit in Bonn as a symbol that the United States was coping with its energy problem. Now the summit is over, Reuss said he hasn't finally made up his mind.

Meanwhile, the president of the Independent Petroleum Association of America said his group would continue to fight hard against the compromise bill even though its chances of passage appear small.

"We see the bill as affecting our survival," Jack Allen, IPAA president, said at a news conference. If the compromise bill passes, "You will see independents leaving the oil and gas industry, and I mean an exodus," Allen warned.

About 50 of IPAA's 5,000 members are in Washington to lobby against the compromise bill.

Allen also said that, because natural gas supplies are now high, total decontrol would have only a slight effect on prices, "and the prices might even drop."

"There is no better time for deregulation," he said, because most pipelines are full and producers have large supplies on hand.