I own a 1911 and a Glock 23 (compact) .40 and carry the Glock. However, after shooting my friend's Springfield XD 9mm, I cannot wait to trade my Glock in for a new XD.
I've always known that I am a better shot with the 1911 than with the Glock but always attributed it to the longer barrel and heavier feel in my hand. However, after shooting my friend's XD 9mm, I was able to hit 70ft targets with the same precision as if I was using my 1911... but here's the catch... I could fire the 9mm almost twice as fast and hit with the same precision. I then switched back to my .40 Glock and had no such luck.
The 9mm felt like a much smoother round than the .40 (duh, it's a smaller round) but I feel like it has a comparable "stopping power"--which is what you need out of a gun purchased for self-defense.
I would recommend a Springfield XD compact (it's double action) in a 9mm caliber. It has a lot of great safety features which makes a beginner feel much more comfortable--especially for carrying. Grip safety, protruding striker, etc..
http://www.springfield-armory.com/xdfeatures.php
And to echo what most have already stated, 9mm is cheap and easy to find. Buy cheap for the range. However, when you purchase your first gun, be sure to buy two clips and always have one loaded with the more expensive Gold Dot "flying ash trays" for "stopping power"--
http://www.speer-ammo.com/products/gold_dot_prsnl.aspx
Also, since this is for self-defense, I recommend reading this:
http://www.outdoors.net/site/features/feature.aspx+Forum+Firearms+ArticleCode+2602+V+N+SearchTerm+
(hey, surprised the Gold Dots are pictured in that article? I'm not..)