In the wake of the United States Supreme Court legalizing same-sex marriage, a number of county clerks and other officials have announced their intent to refuse to issue licenses for such marriages. What legal remedies are there in such a situation?
The details depend on the state, of course. The common law thing you are looking for is a writ of mandamus -- a court order to a public official to do something (or not do something) that they are required to do under the law. Writs of mandamus were traditionally only applicable to ministerial tasks (i.e. things that are basically paper-shuffling where there is little to no discretion); marriage licenses are typically considered ministerial. With discretionary actions, things are much more complicated because the government official is supposed to have significant ability to decide what should and shouldn't be allowed; mandamus doesn't apply unless there's a right to the action requested. In some cases, mandamus has been replaced with other forms of judicial review, but in Alabama it is definitely still mandamus that's involved (source: mandamus is what's previously been used to stop issuance of licenses).
For federal review, which is more likely to get somewhere, the approach to use is the exact same thing that led to DeBoer (the case bundled into Obergefell that was about granting licenses), and Perry, and many of the other gay marriage cases: a lawsuit seeking an injunction or declaratory relief under 42 USC 1983, which allows actions in law and equity whenever anyone denies civil rights to a US citizen (or someone in the jurisdiction of the US) under color of law.
The ultimate result of this kind of suit is a federal court order to issue a marriage license, or a declaration that it's illegal to not issue the license (and so anyone who doesn't will be subject to a court order). Violating this order, like any court order, is contempt of court.