Yes, a woman can gain muscle.
However, it is a comparatively tough job for women to gain muscle as compared to men. In comparison to men, women have lower testosterone levels (which aid in muscle growth) It is often quoted that women have 15 times less testosterone than men. It makes it harder for ladies to build muscle tissue in the first place.
During strength training, however, women develop the same percentage of muscle mass as males. Women, in fact, attain the same amount of growth and strength as males. The starting point is the sole difference. Men begin with higher muscle mass and strength, but both men and women see the same proportionate gain in muscle size.