There's no 'policy' of the Republican party, at least the way you seem to be implying. It's more like a set of opinions or beliefs that or more commonly associated with members of said party. It's not as if though that someone who's a Republican is compelled to vote Republican.
As for you example of gay marriage, a person can be supportive of gay marriage but still vote Republican. For example the candidate the person's voting for my be in support of gay marriage as well, despite being a Republican. It also depends on why the person's voting for that candidate. The candidate might be against gay marriage, but a person might vote for that person because he or she thinks that candidate would be best suited to govern a city/state/nation than the other candidate. The voter might disagree with the person on some issues, but still believe him or her to be a better choice than the democratic candidate. It's not as if gay marriage is the only deciding issue in said election.