If you've been doing extra exercise, that's likely the cause of your weight gain. Your body stores water weight for a little while after weight training; the extra fluid is part of how your body copes with building and rebuilding muscle.
I can pretty much count on as much as an extra pound the day after I lift weights, especially if I was extra zealous about it. Your body may do something similar. Believe me, I can empathize with your disappointment; the first time I saw this happening, I was miserable until I realized that the exercise was just causing some brief water weight gain.
Every body is different, but it seems unlikely that you'd actually gain weight during ketosis. You sound like you're doing such a good job; keep it up and your body will have no choice but to stop being a pain in the *** and get with the program.