Despite the frantic efforts of western-state senators and a last-minute nod from the White House, Congress refused yesterday to let the Synthetic Fuels Corp. grant more than $500 million in federal aid to two oil-shale plants before being put out of business.

The aid would have come as a $327 million loan guarantee to Union Oil Co.'s project in Parachute Creek, Colo., and $184 million in loan and price guarantees to Geokinetic Inc.'s smaller Seep Ridge project near Vernal, Utah.

The administration had formally sided with House members seeking to block such last-minute grants by the $7 billion agency, which Congress has agreed to abolish in 120 days. But Tuesday night, at the urgent request of western senators led by William L. Armstrong (R-Colo.), the White House agreed to drop its opposition to the grants.

In what opponents denounced as "literally a midnight raid on the Treasury," the grants came close to approval Tuesday night despite passage of a stopgap funding bill with language forbidding the action.

Officials of the Synfuels Corp. were in their offices past 10 p.m. Tuesday, waiting for a written go-ahead from the Office of Management and Budget to convene an emergency meeting and approve the grants before President Reagan signed the bill.

But the written authorization, which Armstrong said he had been promised by White House chief of staff Donald T. Regan and OMB Director James C. Miller III, never arrived.

Yesterday, conferees working on a long-term money bill again agreed to forbid future spending by the agency except for legally binding contracts approved before the funding cutoff.

Armstrong, upset with what he called the administration's "betrayal of faith," attacked Congress' action as a "disgrace" but said he had no further plans to block action on the spending bill.

In the last five years, the Synfuels Corp. has granted Union Oil $900 million in federal price supports, guaranteeing the company $68 a barrel for any oil it produces from shale. The company has not collected any of the money because it has never been able to make the plant work.

The company was seeking the additional $327 million in the form of guaranteed loans to help make the plant operative. According to congressional aides, Armstrong's eleventh-hour maneuvering may still give Union Oil the legal shoehorn it needs to pry loose the loan guarantees.

As part of his efforts to clear the way for the aid Tuesday, Armstrong secured a letter from the Treasury Department acknowledging that it had "consulted" with Synfuels on the Union Oil contract. Company officials contend that the letter, with a preliminary agreement from the Synfuels Corp., constitutes a legally binding contract.