This phenomenon of capable people being plagued by self-doubt has a name—the impostor syndrome. Both men and women are susceptible to the impostor syndrome, but women tend to experience it more intensely and be more limited by it.
See the footnote for more info on impostor syndrome.