Firstly, diet coke cannot directly make you gain weight as it contains no calories which could be converted to adipose tissue.
However, behaviourally I could definitely see a link. Most people who are consistently drinking diet coke are doing it because they are on a diet. Because they are trying to lose weight. Anybody who is "on a diet" (not those involved in bodybuilding, fitness etc) is destined to gain weight at some point simply because of the behavioural cycle involved.
Also, I wouldn't be surprised if some kind of mechanism exists whereby drinking an artificial coke with no calories does not "trick" the body. The body anticipates calories and sugar from the drink and might get hunger pangs etc when those calories are not delivered.