BOSTON — WHILE there are wildly different estimates, no one really knows how may gays there are in the United States. Their increasing political influence, however, is far easier to gauge.This is particularly true in states such as California and Massachusetts. For several years, the Democratic Party has been seen as the natural home of gay voters. But this is changing as some Republicans have decided they must capture the gay vote to win office and stay there. Consider, for example, the approach to gay-rights bills of Republican Govs. Pete Wilson of California and William Weld of Massachusetts. Governor Wilson, who previously had been seen as a supporter of gay rights, recently vetoed a bill that would have made it illegal for employers to discriminate against gays. Wilson argued that the bill was unnecessary and that current California law provides adequate protections for gays on the job. But the gay community was outraged and charged that the governor had sold out to the party's right wing. Activists staged several demonstrations that resulted in personal injuries and property damage. The Massachusetts gay-rights bill was enacted before Governor Weld's election, and was signed by then-Gov. Michael Dukakis (D). The measure was a popular one in a state that has two openly gay Congressmen - Rep. Barney Frank and Rep. Garry Studds, both Democrats. But Weld continues to champion gay rights from the State House after a campaign in which he condemned discrimination against gays. The Republican's outspoken defense of homosexuals was seen by many as a shrewd move during a campaign against a conservative Democrat, Boston University President John Silber, who was perceived as anti-gay. During the same campaign, the state GOP ran at least one openly gay candidate in a Boston state-legislative district. Many observers here credit Weld's narrow win over Dr. Silber to liberal cross-over votes; gay groups openly campaigned against Silber. Since his election, Weld has named gays to appointive posts and opposed efforts to repeal gay-rights legislation. He has also been an outspoken advocate of women's rights, backing expanded pro-choice abortion legislation and supporting proposals such as making condoms available to high school students to prevent AIDS and pregnancy. Not all Massachusetts Republicans are happy about Weld's positions on sexual issues. Liberal critics claim the governor is insincere, and has only adopted socially liberal positions to cover up his fiscal conservatism and support for conservative causes such as reinstatement of the death penalty. The Weld wing of the Bay State GOP has clearly determined that in a state where Democrats hold an overwhelming, if still-shrinking, electoral advantage, it has nothing to lose and everything to gain by courting the gay vote. The question is whether Republicans in other states will follow the Massachusetts party down this road.