What does Romans 13:2 mean?
Paul has spelled out the Christian doctrine of submission to human authorities, including government authorities. The bottom line is that those in Christ should understand every authority to have been placed in his or her position by God Himself and for God's purposes. Christ's kingdom may not be of this world (John 18:36), but that does not mean believers have license to disobey earthly authority for any reason (1 Peter 2:13–17). Only when commanded by government to disobey God are Christians obligated to disobey the government, instead, and accept the consequences (Acts 5:27–29).Paul now begins to put together the pieces of what that means. Anyone who resists someone in authority is, in truth, resisting God's work. In general terms, human government is one of the ways God restrains the influence of evil in the world (2 Thessalonians 2:7). Resistance to that system will result in judgment. It's not clear if Paul has in mind judgment from the government or judgment from God. Both are possible.
Paul left little room for Christians to tell themselves that they were free to resist human authorities because their first loyalty was to the kingdom of heaven. Those loyal to Christ are specifically instructed to be submissive to human government. Generally, then, civil disobedience is only allowed when a Christian is being asked to sin, disobey God, or act in some ungodly way.