Yes, they are two different things.
Trans is a function of gender identity; that is, which set of social norms someone prefers. If someone is born as one sex but prefers to live as the other gender, "trans" means "across" or "the other" so they are literally "transgender." The opposite is somewhat awkward-sounding "cisgender," pronounced SISS-gender, meaning literally "this side of gender."
Being gay is a function of sexual preference; that is, to whom you are sexually attracted. "Homosexual" means literally "same sex" and "heterosexual" means literally "opposite sex," and then there are bi- (both), pan- (all), a- (none), and more. In case you are tempted to ask me who a trans person considers to be same sex or opposite sex, I do not know. I suspect that there are as many variations to the standard as there are trans people.
So they answer two different questions about the person: How they express themselves, and who they want to bone. Many people identify as one but not the other, but many other people are either or both or some variations thereof, or may even change their identity over time. There are a lot more variations than the simple pink-and-blue they taught us in nursery school, but is anything only as complex as what we learned as little kids?