President Carter announced yesterday he will cut short his western vacation by two days to mobilize an all-out lobbying effort in Washington on pending administration bills, particularly the unraveling natural gas legislation compromise.

Press secretary Jody Powell said the president and his family will leave the Grand Tetons on Wednesday instead of on Friday, as originally planned. Carter began thinking about an early return a few days ago. Powell said, as he watched the pressures escalate at home and began spending increasing amounts of time on the telephone to Washington.

Powell said Carter determined that "there was no substitute for having the president in the center" of the action in Washington, in direct and continous contact with his aides as they prepare for the return of Congress after Labor Day.

On his return, Carter will confront one of the most critical periods of his administration. His Civil Service bill is pending in the House. His vet of the defense spending measure faces a congressional override effort. The Camp David summit, where Carter, Israeli Prime Minister Menachem Begin and Egyptian President Anwar Sadat will make another attempt at a Middle East peace agreement, begins Sept. 5.

These things were known to Carter when he left Aug. 18 for two weeks in Plains, Ga., Idaho and Wyoming. But the natural gas compromise he was so confident about then is now clearly a source of great concern.

It is "the culmination of two years of work," Powell said yesterday as he announced the early departure. Failure of the compromise will "destroy the hope for a national energy policy in this country." He said that natural gas would back up, not reaching areas where it is badly needed. There would be increased use of foreign energy. The dollar, already sliding in value overseas, would suffer some more, he said.

"It is clear that the grouping of interests opposed to the compromise is not capable of coming up with an alternative," Powell said. "What you have there are ideological extremes. . . . It is a question of having something or noting at all."

Powell said the fight on natural gas involves "tremendous stakes. We view it to be as difficult a fight as any we have faced. . . . We don't intend to lose it if there's any possible way."

The compromise gas legislation, which would increase the price of natural gas to discourage comsumption and stimulate exploration, is the key in the administration's energy program.

Its new problems arose last week when Sen. James A. McClure (R-Idaho) - after agreeing to the natural gas conference committee report - released details of a plan he had worked out with the administration on a second energy matter: development of a fast breeder nuclear reactor.

McClure said - and the White House denied - that he had won significant concessions from Carter with a pledge to invest $1.55 billion in reactor research over the next three years, committing the administration to an active interest in fast breeders, which the president previously had criticized as dangerous.

The White House says the McClure agreement represented no substantive change in policy and that its meaning has been reported erroneously, particularly in The Washington Post.

Nevertheless, key senators, including some who supported the natural gas compromise, became angered over what the regarded as a change in the administration's position on fast breeders and turned against the gas legislation despite assurances from the administration that there had been no change in position.

The telephoning began Friday morning from Brinkerhoff Lodge, where the president is staying on Jackson Lake in Grand Teton National Park. Carter, who declined to answer substantive questions throughout his vacation, returned from sailing late that afternoon and spent 20 minutes discussing the natural gas matter with reporters.

"I have always favored a research and development program" for breeder reactor, Carter said. "Sen. McClure wanted to make it look as if he had won a great victory and changed our position, possibly for home-state influence."

The president and his family resumed their recreation the next day, with fishing, horseback riding and a visit to Old Faithful. At the same time, Powell said, Carter began to feel that the final days of his vacation would be no vacation under the circumstances. "He would sit here and work all the time," Powell said.The decision to leave early was then announced.