Feral or strays that have been rescued almost always have some type of parasite. Usually round worm or tape worm (or both) - at a minimum - in addition potentially to fleas and/or ticks. This would be a cause for any cat to not gain weight. For kitty to be healthy, the situation must be addressed.
Unfortunately, products to treat fleas and ticks that can be purchased at stores can kill your cat. Products to treat worms that can be purchased at stores only temporarily rid your cat of the parasite. The eggs of the parasite remain in your cat and become adult worms, so your cat is basically reinfected with worms in about three weeks.
Given kitty most likely has worms, the only treatments that work are products that must be prescribed by a vet. They have to determine what type of parasites your cat has, and dependent upon what they are, different medications would be prescribed. They need to be administred under vet supervision, because they need to be administered over time at several different times.
Bear in mind that there are many other potential causes (other diseases) that could also cause a kitten to not gain weight. Again, the only one that can accurately determine the cause is a vet.
Thank you for rescuing this kitty! However - any time a cat is rescued, one of the very first things that needs to be done is to get the kitty to a vet for an exam.