The biggest difference between these two ethical principles is that the Golden Rule is mainly subjective, whereas Kant's Categorical Imperative is an objective idea.
According to Kant, the Golden Rule—to treat others as you would have them treat you—is impossible to universalize and therefore cannot become an absolute moral standard. He argues that it does not contain within itself any principles of duty to ourselves or to other people. In short, it lacks objectivity, the kind of objectivity that a true moral standard—such as the Categorical Imperative—must have.
Through the years, many philosophers and scholars have criticized the Golden Rule on the grounds that it allows for reciprocity in evil actions. So, for example, someone who enjoys giving and receiving pain would find it perfectly acceptable to inflict pain on others, as that is what he would have done to himself.
Kant's Categorical Imperative has no place for such anomalies. The actions carried out according to its dictates are moral because they can be universalized. That is to say, they can apply to different places at different times. Harmful masochistic acts definitely wouldn't fall under this category. If such acts were universalized, then the whole world would consist of societies in which people went around inflicting pain on one another on the basis of a subjective view of what is good and desirable.