LOL for most people gaining weight is NOT a problem! The key with everything is moderation.
So for example, most of the time on low carb you eat a lot of veggies that are low in sugar. Brussels sprouts, celery, that sort of thing. You get a ton of fiber which is good for you. In your case if you want to gain weight for some reason, then you just ratchet up the natural sugars you include with that. So you "upgrade" to peas and corn for example. Those veggies have a ton of natural sugar in them. That will be sure to add calories into your diet, without going to junk food.