Matthew 22:21
Should we obey secular authorities or God?
In Acts 5:29, the "law" being set down countermanded God's requirements. The Jews told Peter and John to stop spreading the Gospel; that was opposite to Jesus' command to spread it. We are given credit for realizing that God's orders should not be overruled by any human intervention.
Viewing the other verses as contradictory reveals a misunderstanding of when and why each was written. Consider the social context of these epistles. When Paul penned letters like Romans, Nero was emperor, but he was still in the realm of sanity and was a fairly good ruler; Christians were not being persecuted by Rome. Paul is not here concerned with the hypothetical possibility which eventually became reality: That the government would turn against the Christian faith.
Had these words been penned ten years later, the instructions would assuredly have been tempered quite differently, and be more along the lines of Acts 5:29, where a choice did indeed have to be made between obeying God and man -- because as of the time when this passage was written, there was no human law which was in contradiction to the will of God. Paul could truly say "obey the law" without qualification, because there was no law on the books at the time that was objectionable from a Christian perspective. This principle doesn't carry over in a high-context setting in which legal rulings were abbreviated as much as possible and law codes were didactic rather than administrative in nature.