Brazil's officially authorized opposition party made significant gains in last week's congressional election, but the government party kept its majority in the Congress.

Each side is interpreting the results as a victory for itself.

For the first time since the military seized power here in 1964, the opposition appears to have won a majority of the popular vote. Because of the electoral system, however, it will not have a majority in Congress.

Latest returns show 15.2 million votes for the Brazilian Democratic Movement, the nation's only legal opposition party, to 10 million for the government party, known by the acronym ARENA. The leading television network predicted that ARENA will emerge with a 227-193 majority in the lower house of Congress.

The opposition showing was strongest, as expected, in the key industrial and agricultural states of the south, where two-thirds of Brazil's population and three-quarters of its economy are concentrated.

The opposition was also making inroads in the impoverished states of the northeast, where political bosses traditionally have been able to deliver the vote for the government. These results, said Carlos Castello Branco, the nation's leading political columnist, indicate that the Democratic Movement "has the clear support of the majority of the electorate" and "represents the dominant tendencies in Brazilian society."

The opposition gains came despite a series of restrictive measures put into effect after the opposition scored a spectacular election victory four years ago. Under one such ruling, candidates were prohibited from speaking, advertising or debating on television and radio and were limited merely to reciting their name, ballot number and background.

Then, in April 1977, an official decree gave the president the power to fill one-third of the seats in the Senate by appointment. At the same time, Brazilian President Ernesto Geisel ruled that the governers of the nation's 22 states would be selected by the same process - dubbed "indirect elections."

Geisel also expanded the number of seats in the lower house of Congress, favoring states in which ARENA traditionally has made the strongest showing. But the opposition foiled this effort to pack the Congress by winning two-thirds of the newly created seats.

Even as the ballots were being counted, political leaders on both sides of the aisle were predicting that this election would be the last under the two-party system imposed by degree in 1966. Under political reforms scheduled to go into effect Jan. 1, at least two and perhaps three new parties are expected to be formed, including a leftist Labor Party and a right-of-center Social Democratic Party.

Such a development is expected to make it easier for Gen. Joao Baptista Figueiredo to rule when he assumes the presidency March 15. Observers here predict that a significant number of opposition "moderate" will join ARENA "liberals" in a new party that will be distinct from the government party but will support the government's program of a "slow and gradual" return to democracy.

Brazilian voters are clearly unhappy with the artificial two-party system imposed on them by the military. About 8 percent of the electorate of 46.8 million cast blank ballots, and millions of other ballots were declared void after having been spoiled apparently by irate or ignorant voters.