Just remember - unless you literally ate thousands and thousands of calories more than you burned, it was never fat gain! The scale cannot know when you've had good or bad sleep, too much salt - it can't know if you're having hormone-influenced swings, how much the food/fiber you ate weighs, it can't explain that the 1kg gain isn't fat but just water and glycogen stores on a day where you might have had enough carbs that the body restocked glycogen. (For every gram of glycogen the body stores, it stores 3 grams of water as well! This fact often gets misquoted as "grams of carb=3 gram of water" but that's not really what's happening).
If you're logging your intake and calorie burn dutifully, and you know you're not exceeding your amounts you can TRUST that you know more than the scale, and stay the course! :) Keep thinking positive, and good luck to you!