What does Romans 13:5 mean?
This verse is about our ultimate motivation as Christians for submitting to the human authorities in our lives, including those in government. Paul has written in the two previous verses that God uses those in government authority to express His wrath against people who do wrong. The kind of wrong Paul is describing is criminal activity that hurts other people: stealing, murder, etc. This is one way all leaders, even the ungodly, serve God's will: by restraining some kinds of evil on earth (2 Thessalonians 2:7). Even Christians ought to be afraid of government authorities when doing those kinds of wrong things.Paul writes, though, that such fear of those in authority is not the only reason to obey the law. We should do so for the sake of conscience. By that, Paul means that we should be in submission to human authorities because we know, as Christians, that it is the right thing to do. It is God's will for our lives. In a general sense, it's part of the Christian sense of humility. We are not the ultimate authority, so we ought to be submissive to those in power over us.
It goes without saying that there are exceptions to the idea that government is a force for good. Paul was painfully aware of this himself. He spent much of his life in Roman prisons. He did so without attempting to harm or overthrow his captors—that's submission. However, Paul was not "obedient" to the ungodly parts of Roman law. He refused to stop preaching about Jesus, even when those in authority told him to. He understood that he was responsible to obey God first if it came to a choice between that and obeying human laws (Acts 5:27–29).
Paul chooses not to address that in this passage, however. Truthfully, that is the exception and not the rule. In the case of almost every law and human authority, submission is God's will for His children during our short time on this side of eternity. Submission and obedience are normally the same thing—but they are not always the same.