Likewise, in my adventures in power lifting and body building, I gained ~25-40 lbs on several occasions. The only way to do this reliably for me was to count calories.
Once you establish your basic metabolic rate, it simply works. Yes, it is a pain in the ass. Yes, it's a lot of effort and discipline.. but the results are predictable and reliable.