The first year of the Reagan presidency has been a mixture of gallantry and gaucherie, of talent and tawdriness, of accomplishment and embarrassment the likes of which we have rarely seen.

In his first 12 months in office, Ronald Reagan steered through Congress an economic program reversing 50 years of previous history and the handiwork of two historically giant predecessors, Franklin D. Roosevelt and Lyndon B. Johnson.

He did that without the full partisan control of Congress that they enjoyed and in the face of stubborn claims that he had no mandate from the voters for any such course.

He did it by being a man of conviction, courage and steadfastness--the very qualities he showed so clearly in the aftermath of the attempt on his life. He had the firmness to insist that curbing inflation was not only an economic necessity but a political and moral imperative.

For he understood from his months of campaigning among the people that inflation was eroding something much more important than the value of the dollar. It was eroding a vital part of the American value system--the belief that if you work hard, spend sensibly and put a little bit aside, you can achieve a better life for yourself and provide greater opportunities for your children. The economic prosperity and social stability of this society rest on this proposition.

By his single-minded insistence, he forced Congress, the bureaucracy and the interest groups to abandon their habits of wasteful spending. And the reward, coincidentally or not, has been the significant abatement of inflation and the fears that it spawned.

But if Reagan was the first president since Johnson to accomplish his most important first-year goals, he is also the first since Warren Harding to end his first year with substantial and growing doubts that he is the master of his own mind and his own job.

Indeed, as the year drew on, and the phrases honed in months of campaigning became less and less useful in defining and deciding the policy choices facing government, the sense of uncertainty about the president's grasp of policy grew apace.

Others are better qualified to judge the effects of this uncertainty on American foreign policy. But, in domestic affairs, it has been unhealthy. Too many people are beginning to see that Ronald Reagan's mind is not the source of instruction and direction for his government, but the prize over which the active contestants for power in the White House and Cabinet wage increasingly open warfare.

To hear him speak extemporaneously on domestic policy is to hold your breath in nervous anticipation of the unknown. Too often, the thoughts he expresses have had to be corrected or reinterpreted by people who ought to be his subordinates, not his mentors.

And, increasingly, as the year progressed, it has become clear that the president's concept of domestic policy leaves little room for the fundamental American value of fairness. It is not simply that the cost of curbing inflation has been much higher than Reagan advertised--whether measured in unemployment, deficits or interest rates. He may be forgiven, for the forces in the economic world are powerful enough to defy anyone's effort.

What is harder to accept is that at the same time he was deliberately tilting economic policy toward the rich and powerful, through the massively regressive tax cuts, he was systematically removing government assistance from some of the most needy and powerless.

The moral meanness of the Reagan administration has been evidenced constantly: in its indifference to civil rights for blacks or equal rights for women; in its attack on legal services for the poor; and in the president's own cruel remark that those who cannot find good jobs or schools or services where they live should "vote with their feet" and move on.

Even when the Reagan administration decided to distribute cheese to the poor last week, bringing on scenes of Depression-era soup kitchens in the nation's capital, it did so not from a desire to relieve their hunger but from a desire to cut government storage costs.

I spent the other evening listening to a group of Episcopal ministers from urban parishes talk about the frustration and growing desperation of their neighborhoods. There, the recession is a depression and it has lasted for much more than six months.

They could see, after some reflection, that Reagan had achieved a politically and morally important objective in relieving working- class and middle-class fears of the cancer of inflation.

But if the Reagan program allows the middle class to gain its security only by feeding the greed of the rich and adding to the pain of the poor, it will be a dubious achievement --as equivocal as his presidency seems at the end of its first year.