There was a different attitude in those days.
He was murdered in 1968 when we had largely de-criminalised homosexuality but were treating it as a mental illness. We hadn't quite reached the point where we regarded it as a natural human orientation
At the time he was murdered, King couldn't have supported gay marriage. Also, as Aux Arcs pointed out, as a Baptist minister he would have been theologically opposed.
Had he lived today he may well have seen the justice of it.