Spain's Socialist Prime Minister Felipe Gonzalez reaffirmed his moderate policies during a three-day parliamentary debate this week that followed his first state-of-the- nation address.

The bitterest criticism of the 41-year-old Gonzalez came from veteran Communist Party leader Santiago Carrillo, who labeled the policies of the 10-month-old Socialist administration "bourgeois" and "conservative."

But while the prime minister won a wide parliamentary consensus, there appeared a groundswell of opposition by organized labor to his austere economic policies. There also were indications of unrest among conservative military officers, and a public clash between the government and the Roman Catholic Church added to the disquiet.

The government's economic problems and its narrow margins for maneuver were highlighted by a cautious 1984 budget, the first full budget of the Socialist administration, which was presented to parliament today. The budget is designed to reduce a burgeoning deficit through tight controls on public spending and slightly increased income taxes.

Gonzalez said that although the economic situation was "serious," there were, nonetheless, encouraging signs. He itemized a leveling off in the jobless rate--currently 2.1 million are unemployed, representing close to 17 percent of the active labor force--and a reduction of the inflation rate. It is on target for 12 percent this year, compared to 14 percent last year.

Opposition from organized labor focuses on a drastic program for streamlining money-losing state industries and on plans to hold next year's wage increases in the public sector to 6.5 percent--1.5 points below next year's proposed 8 percent inflation rate.

The government faced its first major showdown with the unions yesterday, when it ordered the dismissal of 80 men and the suspension of another 86 at a state-owned steel plant. The men had defied management orders by working on a line that had been discontinued under production cutbacks.

Labor unions threatened a national steel walkout, and the industry minister retreated by withdrawing the dismissal notices. The government's loss of face raised questions about its ability to carry out its promised rationalization program.

Alleged unrest among senior officers and extreme conservatives prompted a sharp reprimand by the prime minister in his state of the nation address. Gonzalez said he was "concerned that there still exist people in the military and civilian life who do not accept that parliament is the sole institution that is constitutionally empowered to control the government."

The reference to a continuance of what Spanish commentators term "the military problem" came a week after the regional commander of north central Spain, Gen. Fernando Soteras Sotomayor, was fired for voicing criticism of the government in a magazine interview.

The general, who has since become a national celebrity, also called for a pardon for the imprisoned leaders of the 1981 military coup attempt. The defense minister met yesterday with the Supreme Military Council, a group of senior generals with field commands.

No details of the meeting with the military were released. Reports conflicted as to whether the Soteras case was presented as one of "an individual general speaking out of turn," as one official put it, or whether his views represented a cross section of military thinking. An unconfirmed report by the news magazine Tiempo said the general had circulated drafts of the interview among fellow officers before its publication.

The clash with the Roman Catholic Church emerged today when the Education Ministry, in an unprecedented move, banned the circulation of two religious-school textbooks that had been endorsed by the bishops' educational commission and published by the bishops' company.

The Education Ministry reportedly objected to the text books because they quoted Pope John Paul II saying that abortion was murder. The government shortly plans to introduce legislation to lift the ban on abortion in cases of rape, malformation of the fetus or a threat to the mother's life. The official reason for the ban on the books was that they had not received official sanction.

Despite the controversies, the Socialist majority in parliament--it won 202 out of 350 seats in national elections last October--appears unassailable.