What ever you have mention..It does not look that your medicine is responsible for weight gain.
1.Please mention how many kg you have got in how much duration...please check your diet and any change in activity.
2.It seems that..this is Telogen eflluvium...sodo not worry ..it will subside with time and hair will regrow.
3.Take Tab. Biotin
4.Good protein diet/Iron suppliment
^. some time stoping of minoxidil
accelerate telogen hair loss..do not worry will take time but subside spontaneously.