Three days before the electorate will pass judgment on him, President Carter acknowledged some of the failings of his presidency today but said the experience he has gained would strengthen him in a second term.

Barnstorming through the state, where his hopes rest on the turnout of black and Hispanic voters, Carter stopped here this afternoon for a speech directed less at Texas than at a national audience dissatisfied with his performance but still apparently uncertain about putting Ronald Reagan in the White House.

"In four years as president I have learned a great deal," Carter told an airport rally here. "I have learned that it is not always enough to be right. aWe must set priorities or the most important work may not get done. We need to make our program understood and then build a consensus for them."

It was a grimly determined president who moved through Texas today.His voice showed signs of rawness and his right hand was bruised from endless handshaking. In public he was buoyant, smiling and waving to the crowds of respectable size that saw him. Often he raised his right fist in a sign of determination.

After concluding a speech at the Alamo in San Antonio earlier today, Carter returned to the microphone to voice the message that his campaign organization is frantically putting out to Democrats in this and other key states.

"I need you," he shouted.

What Carter most needs in Texas is to energize black and especially Hispanic voters. Setting out from Houston this morning, where Friday night he spoke to one of the most enthusiastic rallies of the campaign, he moved through the Rio Grande Valley beginning in Brownsville in a last-ditch effort to do just that.

Bob Armstrong, the Texas land commissioner and a key Carter campaign official here, told reporters the race in Texas is "very close," an assessment disputed by Republican Gov. William Clements, who has predicted 60 percent of the vote for Reagan on Election Day.

"This trip is extremely important to tell them there is an election on Tuesday," Armstrong said. "Either we get our vote out or we lose."

There were, however, few outward signs today of any dramatic pickup in Carter's momentum, which his aides acknowledge has stalled in the aftermath of last Tuesday's presidential debate. The crowd that gathered outside the Alamo was smaller than the one that came to a similar event there four years ago, and elsewhere in San Antonio few people turned out on the streets to watch the president pass by.

Despite the sense of unease that has become increasingly apparent in the Carter campaign entourage, the president's aides found solace in their memories of the 1976 election. Four years ago at this time, they were close to panic as then-President Ford drew even with Carter in a last-minute surge. But over the final weekend of the campaign, Ford's strength eroded enough to allow Carter to squeeze out a narrow victory.

Veterans of the 1976 Carter campaign are betting that this will happen again in the next three days when, as one of them put it, "people really start to think about Ronald Reagan in the White House."

"It probably feels a little bit better [now]," White House press secretary Jody Powell said in recalling 1976. But Powell added that no one could be sure whether the president's so-called "pause in momentum" would end soon enough or whether "it will be like 1968 . . . when the Democrats began to come home, began to move up, but not quite enough."

In the closing days of the campaign, Carter has referred repeatedly to the 1968 election, when he said Democrat Hubert H. Humphrey lost to Republican Richard M. Nixon because too many Democrats did not bother to vote.

All today, the president tried to focus the attention of Texas Democrats on the closeness of the election and the alternative if he, like Humphrey in 1968, falls just short.

"Think about the consequences in your life if Wednesday morning you wake up and you face the prospect of a Republican being in the Oval Office for the next four years," he said in San Antonio.

Carter aides billed the president's speech in Abilene as a major address, a last chance before the election to lay out his plans and visions for a second term. In the speech, Carter, who has been criticized for waging a negative campaign against Reagan, dropped the criticism of his GOP opponent to concentrate on what he called his desire to bring the country "security at home [and] peace abroad."

Speaking of his four years in office, the president said "we have laid a foundation for further progress.

"We have paid a short-term price, for that is the nature of investing in the future," he continued. "Today's sacrifices will bring tomorrow's security. Our investment will begin to pay dividends over the next four years -- if we stay on course."