I believe what happens is that your body becomes accustomed to your new eating habits and your exercises. That's why it is encouraged to change your routine. It does sound like you are exercising quite a bit and eating properly, so I'm not exactly sure why you are gaining weight. Could it be muscle mass?
Either way, if you have not already, I would begin tracking and monitoring your activity levels and calorie intake. Something like the BodyMedia Fit armband is perfect to monitor your personal fitness. It has multi-sensors and tracks calories burned, calories you consume and the intensity of your activities (exercising or leisure activities). This will help you keep on track with your personal fitness plan and help you see where you can make improvements. Hope this helps.
Here's a link to their site:
http://www.bodymedia.com/