Could I have gained weight because of the antidepressant?

Which one? In general, anything can happen with any patient and any medication.
Possibly. Some antidepressants have more of a propensity for weight gain than others. Specific antidepressants may tend to be more weight neutral or be associated with weight gain or loss. If you advise of the specific medication - we can provide you with a much more specific response. Please clarify and re-ask.