Montgomery County Republicans began this election season hoping for major gains in the state legislature. Now, with just two weeks left until the Nov. 2 election, the GOP's fate may well hinge on a politician who is not even on the ballot: Ronald Reagan.

Republican Party officials this year were concentrating their efforts in three districts where Republicans are not as hopelessly outnumbered as they are in the rest of the county. In the 15th District, which includes the upcounty and Potomac; in the 16th, which includes Bethesda and Chevy Chase; and in the 17th, which includes Rockville and Gaithersburg, the GOP fielded a full slate of more-or-less known candidates.

But in each of these districts, Democratic candidates are talking a lot about Reagan and the effect of his economic policies on the traditionally recession-proof county. The GOP candidates, meanwhile, are trying to focus debate on local issues in a year when statewide polls show voters more sharply split than ever along partisan lines.

In the 15th District, candidate Jean Roesser has been touted as one of the Republican party's brightest hopes for capturing a seat in the House of Delegates. Roesser, a veteran of Republican and women's club circles, bolstered that opinion when she finished first in her primary, ahead of Republican incumbent Robin Ficker, whose politcal antics have earned him widespread name recognition.

Asked in an interview if there is an anti-Reagan sentiment in the county, Roesser said: "There's a little of that." But she went on to admonish Democrats who criticize the president without offering anything other than what she termed big-spender, high-tax solutions.

"Give us an alternative," she said. "I think President Reagan has tried to get a handle on the debt. It's very easy to criticize and to tear apart. But we have to wait a little bit longer."

Another who believes Reagan's economic program must be given more time is Dr. Allan C. Levey, a Potomac dentist and Republican moderate who beat out a conservative for the chairmanship of the state's Republican Party. Levey is running for the state senate seat held by Laurence Levitan. Levey defends Reagan when asked.

At a recent gathering in Potomac, for instance, a member of the audience wanted to know what the GOP chairman thought of Democrat Michael D. Barnes, the 8th District congressman seeking reelection. "Mike Barnes is a nice guy," Levey replied. "I just have one problem with [him]. Everything Ronald Reagan has proposed, Mike Barnes has voted against."

Levey's public defense of Reagan against the naysayers is a position that Democrat Levitan is trying to exploit.

Levitan said he will hold on to votes in Potomac this year because "I just don't see Democrats this year, of all times, switching over to vote for the chairman of the state's Republican Party."

Levitan also has the Democrats' key advantage: He can say he is a Democrat, running on a ticket of popular moderate-to-liberal Democrats in a state that polls show leaning decidedly Democratic this year.

A recent Washington Post poll, for one, showed Gov. Harry Hughes and Sen. Paul Sarbanes leading their GOP challengers by wide margins. Barnes leads his opponent by an even more lopsided margin, according to his own poll. The one common thread running through all the survey data is Maryland voters are sharply polarized along party lines. In heavily Democratic Maryland, that polarization bodes ill for the GOP.

While Republican candidates, such as state Sen. Howard A. Denis, downplay their party label, Montgomery Democrats this year are wearing their party on their sleeves. Levitan, campaigning door-to-door last week, handed out literature for Hughes and the governor's running mate, J. Joseph Curran, and told potential voters at each household, "Hi, I'm Larry Levitan. I'm running with Harry Hughes, Paul Sarbanes, [Attorney General] Steve Sachs. . . . . We've got a good Democratic team for you this year."

The Republicans this year have a common theme and strategy. They stress local issues, such as poor upcounty roads or a bill to require covers on gravel trucks. They talk about how the Democratic party's domination of state politics has made the legislature something like a social club.

Republicans don't seem to mind pushing their party label under the carpet. They rarely mention it in campaign literature or on posters and billboards, while Democrats tout their party in bold letters. But, said Denis, "That's the way [Sen. Charles McC.] Mathias campaigned. He didn't go around telling everybody he was a Republican. . . . The voters respect that."