The Carter administration said yesterday it will act by noon today to end the nation's crippling 2-day-old rail strike as it gave negotiators 24 hours to resolve their dispute without government intervention.

Only hours after Labor Secretary Ray Marshall summoned union and industry bargainers into marathon "last-chance" talks, striking railway clerks expanded their picketing to virtually all of the nation's major railroads, thereby threatening even more disruption.

Marshall, acting on President Carter's behalf, issued the bargaining ultimatum yesterday morning, asserting that "our economic health is imperiled by a continuation of this strike."

He said he was mildly optimistic that a negotiated settlement could be reached, but added: ". . . If this [noon] deadline passes without an agreement, both sides can expect with certainty that the administration will take further action." He emphasized the word "certainty."

Marshall did not spell out what the government might do, but said the options include appointment of a presidential emergency board or special legislation, both envisioning an immediate back-to-work order to the more than 300,000 railway clerks who have so far shut down more than two-thirds of the nation's rail system.

Sources said no decision has yet been made, but one official said the Labor Department was leaning at one point toward congressional action to order the strikers back to work for a cooling-off period, a course taken before in rail disputes.

The strike, which started two months ago as a local dispute between the Virginia-based Norfolk & Western Railway and 4,600 members of the Brotherhood of Railway and Airline Clerks (BRAC), fanned out across the country early Tuesday, when BRAC started picketing 43 other rail lines that have been assisting the strike-bound N&W.

The mid-afternoon action yesterday to expand the strike would affect about 70 railroads, according to a BRAC spokesman. An industry official said this would considerably sharpen the impact of the walkout, even though the hugh Conrail and Boston-to-Washington Amtrak systems in the Northeast were still unaffected.

On Tuesday and again yesterday, millions of tons of freight were stranded and thousands of commuters were inconvenienced. Food shipments were cut by half, threatening many perishables, and coal shipments were reduced to about one-third of normal.

By yesterday morning the job lay-offs began, signaling the sensitivity of the nation's economy to rail transportation. General Motors and the Ford Motor Co., the country's two largest automakers, announced layoffs because of parts shortages, and GM predicted massive shoutdowns if the strike were to last until the weekend.

Short of ending the strike, there was little the government could do to alleviate the impact. The Interstate Commerce Commission authorized bus and trucking companies to expand their operations, but this was expected to offer only limited relief.

"These are some of the reasons why this administration cannot take a hands-off attitude toward this strike," said Marshall, a strong advocate of governmental restraint in labor disputes. "We are determined not to allow this strike to cripple our nation's economy," he added.

Tuesday's picketing was confined to the 43 railroads that "interchange" goods and services with the N&W, with which BRAC is deadlocked over the sensitive issues of union jurisdiction and layoff protections.

Yesterday's picketing extends to a total of 73 railroads that have been contributing $800,000 a day to the N&W under a mutual aid strike pact the union is also fighting in court with a $3.5 million antitrust damage suit.

Although many railroads have gotten injunctions against picketing on the "interchange" issue. Chief Justice Warren E. Burger earlier this week lifted a temporary order agaisnt picketing over the mutual aid issue - thereby freeing the union, temporarily at least, to escape the earlier injunctions and close down more railroads.

The rail industry reacted with relief as the first wave of pickets withdrew under the early injunctions, then lashed back publicly when the new wave rolled across the country.

"Whatever technical claim of legality there may be, the union has plainly dishonored its often repeated public assurances that it was mindful of its responsibilities [and] had no intention of creating widespread emergency conditions," the American Association of Railroads said last night.

At his news conference, Marshall said BRAC had indicated that it was reluctant to remove the pickets until it had an agreement with the N&W, an assessment indirectly confirmed by BRAC President Fred J. Kroll as he entered the talks at the Labor Department at noon yesterday.

"People are fired up out there," he said.

Marshall said he didn't believe the two sides were "that far apart." He agreed that the major sticking points were whether certain employes considered supervisory by the company should fall within the union's jurisdiction and protections for workers threatened with layoffs because of automation.

The last-chance negotiations, as Marshall called them, were being conducted between top officials of BRAC and the N&W with the help of a special mediator tapped by Marshall for the task, James J. Reynolds, a former under secretary of labor in the Johnson administration and retired president of the American Institute of Merchant Shipping.

There was no official word last night on progress of the talks, but cautious optimism was prevalent earlier in the day, in part because of pressures building on both sides: waning strike benefit funds for BRAC and risks of an arbitrated settlement for the N&W, which the union has accused of resisting employment security protections common in the rail industry.

Marshall acknowledged that there may be some legal doubt over whether presidential appointment of an emergency board under the National Railway Labor Act would automatically require strikers to return to work.

The act normally comes into play before a walkout occurs. However, Marshall was firm in asserting that the administration's action will be aimed at an immediate end to the strike. Unless there is a settlement and a voluntary return to work, "We'll take action at noon (today) to get the trains moving," he said.

He said he believed BRAC would obey any government order. Kroll said, "We'll have to take a look at the situation."

The country has been free of national railway strikes since 1971, when a two-day strike by signalmen ended in a congressional back-to-work order and a legislated wage settlement.

The strike is not directly related to negotiations for a new national rail contract, which has won tentative approval from several unions, although not the 265,000-member BRAC, which is also suing the government for authority to strike over that issue.