Bananas are fairly high in sugar content and carbohydrates so if you do eat too many Bananas it could cause you to gain weight.
Although I've never had any problems losing weight and eating two Bananas per day while on the weight loss diet.
Just avoid eating more than one or two Bananas per day when trying to lose weight and you should still lose weight as long as you put in exercise into your weight loss routine.
Although Bananas are high in carbohydrate and sugar content the Bananas are also low in calories so they should not cause too much weight gain if any at all as long as you eat the bananas in moderation during the weight loss.