What do you want the handgun for? Defense in the home? Defense out-of-home with a CCW (Carry Concealed Weapon) permit? If you're planning the CCW route, you also need to be concerned with handgun size (concealability). Hunting? Target shooting?

You will definitely need cleaning supplies with brushes, etc., sized for your caliber.

You will need ammunition (duh!) .22 caliber ammo will be cheapest and a reasonable handgun to learn with and target shoot with. Not suitable for defense though. Next up in cost would be 9mm (cheaper than other calibers, because it is so common). You'll see that once you move from .22 to anything else, the price of ammo jumps tremendously.

If you end up buying a semi-auto, you should probably buy some dummy rounds to practice safe handling with. With a semi-auto, you'll want to buy additional magazines also (probably two more to start with).

You will need to buy hearing protectors and safety glasses.

A good holster will be mandatory for out-of-home defense/CCW. There are many different types. Don't buy a holster for CCW use until after you've taken a training course (and learn the potential carry options).

A trigger lock may be required in your city. It would be a good idea if you have children. Either that, or some other way to securely keep your gun out of their hands. A small safe, etc.

You may want a case to carry your gun back and forth from the range. I go for the cheap Plano boxes myself. A metal military surplus ammo box is quite handy for lugging around ammo. Ammo get quite heavy and a plastic grocery store bag just isn't going to cut it.