That's awesome that you're getting so much exercise in! Just make sure you don't overstrain your muscles.
First of all, I doubt you've actually gained fat! Where are you getting these readings from? Is it from a scale at home? (Even if it's not a scale at home, chances are it's still not accurate.) I'll let you in on a secret: the only thing that it's really measuring is the electrical conductivity from one foot to the other. Because of that, there are SO many things that can mess it up, which makes it WAY inaccurate for actually calculating body fat %. Honestly, take those measurements with a grain of salt. Don't let it be your guide as to how well you are doing!
Also, hydration plays a big role here as well; it can make a big difference in readings.
However, I don't see that you've mentioned your food intake. Eating the right kinds of food and the right amounts of food is 80% of the battle in losing weight, so don't neglect it.
That all said, don't give up! This will feel like a major disappointment to you but you'll get through it!