Behind serene White House expressions of confidence in the ultimate success of the president's economic program, a mood of grim reality has crept into the high councils of the Reagan administration.

When speaking for public consumption, official spokesmen are sanguine. They depict the president's embattled economics program as an adventure screenplay destined to have a happy ending after some stormy battles in Congress. By spring, they say, the economy will rebound, producing jobs for the unemployed, a rally in the beleaguered stock market and prosperity for the nation.

Skeptics who inquire about the rising chorus of criticism from Wall Street and Capitol Hill are reminded that similar skepticism prevailed before Reagan won his resounding budget bill and tax cut victories last year.

Beneath this official view, however, recognition is developing that time is running out on the Reagan administration. As yet, there is no panic. But when speaking on a background basis, high officials acknowledge that both the administration and the Republican Party face political repudiation in 1982 unless there is a strong and sustained economic recovery within the next three or four months.

A few officials go even further, saying that the nation itself faces an economic crisis of a magnitude unknown since the days of the Great Depression unless public confidence in the Reagan program can be restored.

"We have about 90 days for interest rates to come down, or we've had it politically," said one White House official. Another said: "There has to be a strong and visible upswing in the economy by May or early June at the latest--a recovery that people really feel--or our own people will turn against us."

The president is not yet numbered among the growing ranks of pessimists within his own administration. In his private conversations with aides he has repeated his public pledges to hold firmly to his course of tax cuts and military spending increases. He has remained undaunted even by Republican criticism of an out-of-balance budget that some administration officials acknowledge is likely to produce a deficit far larger than the official estimate of $91.5 billion.

Reagan has been an optimist all his life, and he shows no signs of changing at 71. His supporters rightly consider this optimism one of his strongest qualities, and it has impelled him on an improbable career that led from obscure beginnings in Dixon, Ill., to success as a sports announcer and movie actor and then to the California governorship and the White House.

To Reagan the glass is always half full, never half empty. When he talks about the outcome of an economics program, he displays an unshakeable faith that his rosy claims for it will be justified.

Earlier this week Reagan's optimism survived a three-state midwestern trip where signs of disaffection were everywhere in evidence. In Bloomington, Minn., a television interviewer cited the criticisms of Reagan's budget by Republican senators and asked the president how he expected to win congressional support.

"I don't think they fully understand yet," Reagan replied, leaving unsaid his expectation that his critics would eventually see the light.

Outside the hotel where Reagan was interviewed several hundred demonstrators gathered, most of them protesting administration economic policies. One carried a sign which said, "Welcome President Hoover."

At Reagan's two other midwestern stops there were similar harbingers of economic distress. The same edition of the Des Moines Register that announced Reagan's arrival in Iowa also reported that farm income during 1982 may dip below the Depression levels of the mid-1930s, when Reagan was a sports announcer in Davenport and Des Moines.

And in Indiana, where unemployment is now above 12 percent, the friendly Indianapolis Star acknowledged in an editorial pleading for cooperation from Congress and the country that the state's "deep and abiding support" for Reagan's economic programs would be "sorely tested in the coming months."

Back home, in the White House, some of Reagan's staunchest supporters were asking different questions among themselves. They were starting to wonder, with Republicans on Capitol Hill, when the president will begin to question his own conventional wisdom and recognize that the huge projected budget deficits threaten the chances of his program in Congress and the lower interest rates he needs to sustain the recovery he has been predicting.

The answer, so far, is that Reagan remains convinced, as always, that everything will turn out fine in the end.

But among his loyal aides and supporters, the doubts are growing.