I would agree with St. Augustine that "an unjust law is no law at all1." Against that backdrop, this question questions state banning on gay marriage. Applying Dr. Kings analysis, a just law was one that was in keeping with our moral teachings or the moral teachings of God. Likewise, if our moral teachings, teach us that something is immoral, then Dr. King would have advised against following that particular law and instead engaging in non-violent civil disobedience.
If Dr. King felt that homosexual relations were something that were immoral then he would have agreed that state laws banning gay marriage are just and should be followed. Someone advocating in favor of gay marriage might argue that King would have advocated for gay marriage because he believed that all men are created equal and as a marginalized black man he can certainly identify with the feelings that gays have in being denied the ability to have their union legalized. I think however, that given Dr. King's religious background, the moral and vast religious climate of his time, Dr. King would have said that his interpretation of the Bible is that there was to me a union between man and woman only.
I think that any law that allows the separation of people is one that begs civil disobedience. Any law that allows one group of people to have superiority over another group is one that is immoral and therefore must not be respected. For example if a group of gay students are not allowed to attend graduation or are made to feel so afraid to go to graduation that they refrain, refusing to attend graduation even though you must do so to get a diploma is an instance of when civil disobedience is justified. There is a way to get a message across without it becoming violent and without bringing additional malevolence to the marginalized party. The perfect form of civil disobedience was that of Rosa Parks. While we are all familiar with her refusal to give up her seat on a bus, she also brought a line of African American children to a "white" library and had them each attempt to check out a library book. The children were courteous, and sincere when they explained that they needed to get the books from the "white" library and despite being turned away, they did not protest violently.
An unacceptable form of civil disobedience is when there are laws or codes enacted for the safety of a population and they are violated. Rioting or any other form of violence which puts the lives of others in jeopardy is not proper. Further, there is a fine line as to what is pushing the break of the law too far. Remember, Dr. King readily admits that in order the get the law changed, it must first be broken or others will not take notice. Thus the better question, is what is the difference between breaking the law and civil disobedience
3. What is the rule of law Under the rule of law how are government officials supposed to use their power and how are they not supposed to use their power
There does not appear to be one universal definition of the rule of law. However there are basic tenets to the definitions that I did find. For purposes of answering this question I will submit the simplest definition and work my answer