It is vital that we recover an understanding of law and justice which both strengthens the rule of law with authentic moral force and recognizes that unjust, tyrannical, or self-serving law can have no such force.
And it is very important that each of us differentiate between our responsibility, insofar as we have authority to act, and any temptation to disregard authority and become mobs & petty tyrants, ourselves!
First, a recent passage with very high authority, establishing the relevance of the tradition to the current situation:
In those situations where homosexual unions have been legally recognized or have been given the legal status and rights belonging to marriage, clear and emphatic opposition is a duty. One must refrain from any kind of formal cooperation in the enactment or application of such gravely unjust laws and, as far as possible, from material cooperation on the level of their application. In this area, everyone can exercise the right to conscientious objection.
(source: Considerations Regarding Proposals To Give Legal Recognition To Unions Between Homosexual Persons)
Or, as St. Augustine puts it in a dialogue:
Even Tertullian falls in line on this one:
Whenever these statements and answers of ours, which truth suggests of its own accord, press and restrain your conscience, which is the witness of its own ignorance, you betake yourselves in hot haste to that poor altar of refuge, the authority of the laws, because these, of course, would never punish the offensive sect, if their deserts had not been fully considered by those who made the laws. Then what is it which has prevented a like consideration on the part of those who put the laws in force, when, in the case of all other crimes which are similarly forbidden and punished by the laws, the penalty is not inflicted until it is sought by regular process? Take, for instance, the case of a murderer or an adulterer. An examination is ordered touching the particulars of the crime, even though it is patent to all what its nature is. Whatever wrong has been done by the Christian ought to be brought to light. No law forbids inquiry to be made; on the contrary, inquiry is made in the interest of the laws. For how are you to keep the law by precautions against that which the law forbids, if you neutralize the carefulness of the precaution by your failing to perceive what it is you have to keep? No law must keep to itself the knowledge of its own righteousness, but (it owes it) to those from whom it claims obedience. The law, however, becomes an object of suspicion when it declines to approve itself. Naturally enough, then, are the laws against the Christians supposed to be just and deserving of respect and observance, just as long as men remain ignorant of their aim and purport; but when this is perceived, their extreme injustice is discovered, and they are deservedly rejected with abhorrence, along with (their instruments of torture)—the swords, the crosses, and the lions. An unjust law secures no respect. In my opinion, however, there is a suspicion among you that some of these laws are unjust, since not a day passes without your modifying their severity and iniquity by fresh deliberations and decisions.
(source: ANF03. Latin Christianity: Its Founder, Tertullian – Christian Classics Ethereal Library)
And, of course, St. Thomas Aquinas:
Tully says (Rhet. ii): “Things which emanated from nature and were approved by custom, were sanctioned by fear and reverence for the laws.”
I answer that, As Augustine says (De Lib. Arb. i, 5) “that which is not just seems to be no law at all”: wherefore the force of a law depends on the extent of its justice. Now in human affairs a thing is said to be just, from being right, according to the rule of reason. But the first rule of reason is the law of nature, as is clear from what has been stated above (Q, A, ad 2). Consequently every human law has just so much of the nature of law, as it is derived from the law of nature. But if in any point it deflects from the law of nature, it is no longer a law but a perversion of law.
But it must be noted that something may be derived from the natural law in two ways: first, as a conclusion from premises, secondly, by way of determination of certain generalities. The first way is like to that by which, in sciences, demonstrated conclusions are drawn from the principles: while the second mode is likened to that whereby, in the arts, general forms are particularized as to details: thus the craftsman needs to determine the general form of a house to some particular shape. Some things are therefore derived from the general principles of the natural law, by way of conclusions; e.g. that “one must not kill” may be derived as a conclusion from the principle that “one should do harm to no man”: while some are derived therefrom by way of determination; e.g. the law of nature has it that the evil-doer should be punished; but that he be punished in this or that way, is a determination of the law of nature.
Accordingly both modes of derivation are found in the human law. But those things which are derived in the first way, are contained in human law not as emanating therefrom exclusively, but have some force from the natural law also. But those things which are derived in the second way, have no other force than that of human law.
(source: Summa Theologica – Christian Classics Ethereal Library)
And in another place:
It is written (1 Pet. 2:19): “This is thankworthy, if for conscience . . . a man endure sorrows, suffering wrongfully.”
I answer that, Laws framed by man are either just or unjust. If they be just, they have the power of binding in conscience, from the eternal law whence they are derived, according to Prov. 8:15: “By Me kings reign, and lawgivers decree just things.”
Now laws are said to be just, both from the end, when, to wit, they are ordained to the common good—and from their author, that is to say, when the law that is made does not exceed the power of the lawgiver—and from their form, when, to wit, burdens are laid on the subjects, according to an equality of proportion and with a view to the common good. For, since one man is a part of the community, each man in all that he is and has, belongs to the community; just as a part, in all that it is, belongs to the whole; wherefore nature inflicts a loss on the part, in order to save the whole: so that on this account, such laws as these, which impose proportionate burdens, are just and binding in conscience, and are legal laws.
On the other hand laws may be unjust in two ways: first, by being contrary to human good, through being opposed to the things mentioned above—either in respect of the end, as when an authority imposes on his subjects burdensome laws, conducive, not to the common good, but rather to his own cupidity or vainglory—or in respect of the author, as when a man makes a law that goes beyond the power committed to him—or in respect of the form, as when burdens are imposed unequally on the community, although with a view to the common good. The like are acts of violence rather than laws; because, as Augustine says (De Lib. Arb. i, 5), “a law that is not just, seems to be no law at all.” Wherefore such laws do not bind in conscience, except perhaps in order to avoid scandal or disturbance, for which cause a man should even yield his right, according to Mat. 5:40,41: “If a man . . . take away thy coat, let go thy cloak also unto him; and whosoever will force thee one mile, go with him other two.”
Secondly, laws may be unjust through being opposed to the Divine good: such are the laws of tyrants inducing to idolatry, or to anything else contrary to the Divine law: and laws of this kind must nowise be observed, because, as stated in Acts 5:29, “we ought to obey God rather than man.”
(source: Summa Theologica – Christian Classics Ethereal Library)