I have a Glock 17 and it is a good shooter...better than me. But my Glock 22 is better....not really sure why. I feel very comfortable with both and that makes a difference in accuracy. Savage is right, held perfectly, the pistol will outshoot us everytime. It's our shaky hands that are the problem. A couple of things that have helped me: First shooting a revolver with different loads. First pull, bang, second pull, BOOM, third pull, click. My dad would load it and then hand it too me. At first when the hammer fell on an empty chamber I would push the muzzle down anticipating the recoil. This little exercise broke me of that. That is one of the biggest problems with accuracy with a handgun. Second, reactive targets. Steel is great. There's just something about that instant feedback that makes you a better shooter. If you can't get steel targets or shoot them at your range, find something that will move when you hit it. The ubiquitous soda can is great and it teaches you to shoot at varying ranges.
Bottom line, your pistol should shoot fine. Just get out there and practice a lot.