One of the best things about a great success is that it sometimes embolders men - especially political leaders - to acknowledge earlier failures.

Ever since President Carter's Camp David triumph, he has been gracefully owning up to previous foreign-policy initiatives that were less than smashing successes, and he is already discovering that such candor has broad popular appeal.

Even Richard Nixon thrived on reversing himself. In 1971 the former president was almost as bad off in the polls as Carter was a few weeks ago, but then he suddenly ditched his lifetime opposition to detente with the Soviet Union and Communist China and, domestically, embraced wage-price controls he had previously denounced. A year later he carried 49 states in winning reelection.

Today, few voters care that Carter, in seeking a Middle East peace settlement, started in one direction and ended up in another. The president now candidly acknowledges that his original objective was a summit conference at Geneva, but what matters is that it all ended happily at Camp David.

Nevertheless, it is instructive to trace the steps that led there.. It is a story of trial and error, with an experienced new president learning the hard way the facts of Middle East life. But he did learn, which is why he is now a candidate for the Nobel Peace Prize. The road to Camp David was a rocky one, full of wrong turns. It began in early 1977 with Carter's futile unilateral efforts to revive the Geneva approach, followed last Oct. 1 by the administration's surprise deal with Moscow to call for a prompt peace conference under the joint auspices of the two superpowers, a move that would have reinserted the Soviets into full participation in Middle Eastern diplomacy.

Carter believed the U.S.-Russian plan would lead to a new Geneva gathering within a few weeks, but Egyptian President Anwar Sadat and Israeli Prime Minister Menachem Begin had other ideas, culminating in Sadat's historic trip to Jerusalem and Begin's return visit to Egypt in December.

With his own scheme derailed, Carter first put his chips on Sadat, hailing him as the "world's foremost peacemaker," while denigrating Begin's stand as intransigent and unresponsive.

At Camp David, however, Carter had some second thoughts that, in the end, saved the day.

It became clear to him that the "comprehensive" peace he had originally sought was simply not in the cards as of now. It had to be either a separate peace (always Begin's real objective) or no peace. The president somehow persuaded Sadat to accept a settlement that for all practical purposes, was what Begin had been offering all along.

The fact that Carter could subdue pride in his own early opinions, and make the most of an almost insoluble situation, bodes well for the future of his presidency.If he can do it once, he can do it again.

Actually, he already has done it in regard to Africa and his differences with Andrew Young, the U.S. ambassador to the United Nations. Not long ago the White House was forcing Young to apologize for publicly challenging the president's hard-line, cold-warrior posture on Angola, Zaire and other African trouble spots. Recently, however, the administration has backed off from this ill-advised belligerence, and only a few nights ago the apresident went out of his way to praise Young as "a man who's not afraid to speak out when he sees something wrong." It was a handsome gesture.

It's also reassuring to note the way the administration is now cooperating with Russia in what presently looks like a successful effort to achieve a new strategic arms limitation agreement. The president has come a long way from the position he took at the outset of his presidency, when he surprised the Russians with a package of arms limitations that had no chance of being accepted and were instantly rejected. Carter now frankly concedes that it was "naive" of him to think Moscow would have accepted such a proposal.

Perhaps the most hopeful change of all in the president is the way he seems to have resolved the rivalry between Secretary of State Cyrus Vance and Zbigniew Brzezinski , the national security adviser. Until recently, it wasn't clear who was going to prevail as the president's principal adviser and spokesman on foreign affairs, but there is now little doubt that Vance - the patient, persevering practitioner of quiet diplomacy - has won out.