this is gonna be a very lengthy reply. so be prepared to read cos there's really too many factors involved in both these terms - CG & stability.
instead of being CG vs stability. i would say both are linked. or rather, it would be more like CG is a subset of stability. Stability can refer to a lot of things in this case, actually. it depends whether you're talking abt gun stability or body stability. both are affected by CG as well. let's talk abt gun stability first...
whether it's an air rifle or pistol, imagine your weapon having a group of weights fitted on the front or back of your weapon. first it definitely alters the CG, doesn't it? a heavier front would make the weapon fall fwd more easily and it takes more strength to support, but also provides for a shot with much elimination of any recoil. a heavier rear would give u more control at your end, near the body which also means u use less strength and is less likely to fall fwd. having said that, an altered CG would also alter the overall stability of the weapon as it would need the shooter to adjust the required force to be applied to keep the weapon stable.
weapon CG and stability isn't that much complicated. it's the body stability that deals out a whole lot of factors. alignment is one of the things that can affect body stability. but natural alignment is subjective and personal to every individual shooter. i shall briefly explain body CG and stability first.
as i mentioned, CG and stability are linked. and as mentioned by kitty and panda, CG is very much influenced by a person's vital stats, muscle mass, etc. but that's not all. regardless of whichever position you are shooting in, e.g. prone, standing, kneeling for rifle, though in tis case it's mostly standing, how u position(stand) yourself affects your CG as well. for example, if you lean your hips fwd while bending your lower back and leaning your upper back backwards quite substantially(if you can actually visualize what i just said, then try to imagine it), the CG of your whole body is bound to move. and stability is definitely a tough case to mention in such a position.
so first to affect your body stability is your vital stats and then it's how you stand. but even with a certain vital stats (not referring to anyone in particular here), standing positions can still be altered to achieved a CG that falls directly straight down and maximize stability. these positions can be comfortable and uncomfortable. it's all the shooters preference to train in the conditions they desire.
another thing to note is also leg spreading widths. tis also affects the CG. bigger widths which theoretically means a bigger base which lowers the CG, doesn't necessarily mean increased stability. cos again, it goes back to your stats.
there are also ways to improve body stability such as through technical training, as said by kitty. physical training can also help to build stability. technical and physical training are both necessary and critical. but IMO, i personally think that the use of mental imagery and visualization helps improve stability the best amongst all. for e.g., one can visualize that both ankles and legs weighs a ton and it's so heavy, nothing moves it. the crucial thing here is, your mind must feel that weight and you must immerse yourself in that feeling of unparalleled stability. then multiply and intensify the feeling by 10x, 100x, 1000x and even 10000x and as much as you want. but of cos, tis is just one of the many examples. it's up to you to create your own wild and creative imaginations. the crazier, the wilder, the better, as long as you feel it; your mind feels it. the constant application of such will provide you with the ability to induce your mind to control the body well enough that just one instant thought of it keeps you stable. sounds so easy, it's like touch and go. but it takes a whole deal of effort and discipline invested into it.
and of cos, i'm pretty sure there are several more factors. i'll post it up, if i recall any of them along the way.