Maintaining/gaining on lower calories?!

I'm experiencing something really strange and I really hope someone can help me.
About a year ago, I was maintaining at 120 lbs eating around 2100 calories a day and exercising twice a week. After my summer holiday, I felt bloated so I ate less for a couple of days, around 1600 cals. A couple of days later, I found out I had gained about 4 lbs since before my trip, so I decided to keep eating 1600 cals to avoid further weight gain. Unfortunately, the gain didn't stop until I reached 130 lbs. I maintained that weight eating the same amount of calories for about 9 months. In that time, I tried to lose a little by eating healthier and exercising more, but it all didn't help, so I stopped. I was so frustrated that I ate about 500 calories less than before, but weighed 10 lbs more. I still do not understand how that is possible (it's not muscle mass). I decided to up my calories a little to around 1700 a day, and 2000 on days that I exercise. In three weeks, I gained another 3 lbs. I know this is not much, but I only ate 200 cals a day more, whereas to gain one pound per week, you should eat 500 cals more. Now I'm at a higher weight than I have ever been in my life, eating less than before. Does anyone know how this is possible? I'd love to go back to maintaining 120 lbs eating 2100 cals.