For five years, ever since he became the first Mexican-American mayor of this city, 38- year-old Democrat Henry Cisneros has been the shining star of Hispanic politics in America.

The handsome, Harvard-trained executive of the nation's tenth-largest city was the youngest person interviewed as a potential 1984 running- mate by Walter F. Mondale. Today, he has a national forum as the president of the League of Cities and the spokesman for urban America on the pending Gramm-Rudman budget-cutting fight.

But now, for the first time, Cisneros faces the possibility of an emerging rival on his home territory: Judge Roy Barrera Jr., a 33-year-old lawyer who last week announced his candidacy for the Republican nomination for attorney general. Their conflicting ambitions and strategies tell a great deal about the competition between the parties for the increasingly important Hispanic vote.

The Census Bureau estimates that Hispanic voter registration across the country increased 47 percent between 1976 and 1984, from 2.49 million to 3.79 million of the estimated 9 million- plus voting-age Latinos. By comparison, voter registration among blacks increased 37 percent and among whites 16 percent.

Detailed studies by the Southwest Voter Registration Education Project, headquartered here, indicate that in Texas those registration gains were partially offset by a four-point decline in Latino turnout. But William C. Velasquez, the organization's executive director, argued in an interview that 1984's dropoff "was a blip," caused by the lack of enthusiasm across Texas for the Mondale-Ferraro ticket.

"The long-term demographic factors are all on our side," he said, pointing particularly to the fact that the relatively low median age of Hispanics means that Latinos in large numbers will be reaching voting age in the next decade.

Both parties are well aware of these numbers, and Republicans at the national level have given high priority to dislodging the Democrats' stranglehold on the Hispanic vote. Candidates such as Barrera are an important part of that strategy.

Latino voters are by no means monolithic. Cuban Americans, concentrated in Florida, are predominantly Republican, reflecting both their relatively high economic status and their intense anticommunism. While Mexican Americans, Puerto Ricans and others with Central and South American roots are traditionally Democratic, exit polls analyzed by Robert R. Brischetto of SVREP indicate Latino support for President Reagan nationwide "may have been between one- third and slightly less than one-half."

But Democrats have enjoyed a great advantage in the competition by their near-monopoly of Hispanic officeholders. Velasquez said that of 2,861 Spanish-surname officials at all levels his group has been able to identify, "it appears that only about 20 are Republicans."

From Republican National Chairman Frank J. Fahrenkopf Jr. on down, the party leadership is eager to change that ratio, particularly in highly visible statewide offices. In Florida, Tampa Mayor Bob Martinez was persuaded to switch from the Democratic Party and to seek the GOP nomination for governor this year.

Similar encouragement has been lavished on Barrera. The son of a prominent conservative Democrat who was John B. Connally's man in the west-side barrio a generation ago, Barrera was named to a San Antonio district judgeship by William C. Clements when Clements was Texas' first Republican governor.

Establishment support for his candidacy for attorney general is indicated by the fact that his fund-raising effort is being headed by multimillionaire developer Trammell Crow. But his path to the nomination is by no means cear.

Just as Martinez in Florida has run into an ABM (Anybody But Martinez) movement from old-guard Republicans, so Barrera faces primary opposition from a veteran GOP state senator and others.

Few Mexican-Americans vote in the Republican primary in Texas. The willingness of Anglo-conservatives to support a Latino for major state office remains to be tested.

Ironically, Cisneros has shown that it can happen at the municipal level. Since his first mayoral campaign (where ethnic polarization was evident), he has won reelection twice by overwhelming majorities, including the heavily Republican, conservative north side of the city. Developers, Chamber of Commerce businessmen and other GOP stalwarts sing the praises of his economic development efforts.

For five years, the assumption here has been that when Texas elected its first top Mexican American official, his name would be Cisneros. But with Democrats running for reelection in all the major state offices on the ballot this year (including the first Hispanic appointee to the state supreme court), Cisneros' national renown does not translate to immediate political opportunity at home.

He has an active statewide speaking schedule and is keeping his options open. But for now, Cisneros is something of a spectator at Barrera's show, and that is a break for the GOP.