We need some more info. What state do you live in? Do they require a test? The permit should be a standard fee, here in PA we purchase them right at the courthouse. Mine cost me $25 and there was no class.
Classes can be expensive and it depends on what type of class we're talking about. I've seen them anywhere from $50 - $750 depending on what you're looking to do.
As for which gun you should be looking at, you can do your preliminary research on the Internet to find out who makes a good gun and what is a reliable model and the basic price range of the guns.
The next thing you're gonna need to do is to figure out what you're going to be doing with your gun. Is it going to be strictly for self-defense? Is it going to be holstered in your car? Are you going to leave it at home? Is it going to be a competitve target piece?
If you're going to holster and conceal a gun for personal protection and have one on you, you're gonna be looking for size and concealability. The bigger the gun, the harder it's gonna be to hide and the more uncomfortable it will be to wear. It's gonna be hard to conceal much of anything above a 4" barrel, especially when it's not cold out (layers). I have a KelTec P-3AT that is a tiny 6+1 (mag holds 6 +1 in the chamber). It's self-holstering with a clip and is pretty much undetectable. The thing is completely inaccurate at anything past 10 yards or so, so it's strictly protection. I got it after I was mugged and didn't have my Ruger P-94 on me because I can't conceal it comfortably (that thing is enormous, but it sure is pretty!). KelTec makes a 9mm that is virtually the same size, and now Ruger came out with a similar sized 9.
Other guns people like to conceal that I hear wonderful things about are the Glocks and the Springfield XDs. Both come in SubCompact and Compact (3" and 4" barrels), they are both exceptionally accurate and reliable. They will require holsters though.
If it's gonna be a car gun and you're not gonna carry it on you, then you're gonna want something relatively inexpensive but accruate and reliable. Makerovs are great for that! You can get a Mak for right around $200. They were the traditional sidearm of the Soviet military. Otherwise, you want something that if someone breaks in your car and takes, you're not out $1000s, but it's going to be reliable if you need it.
If it's for home use find a gun you like.
If it's for sport/target shooting, you're gonna want something that's accurate for you and has a longer barrel. This is where the 5" barrels are nice. They can shoot longer more accurately.
Ultimately, you're gonna want to go to a range that allows you to rent guns and test them all out. Find the ones you're most comfortable with and shoot the best with. Everyone is a little different, so just because you get a bunch of people ranting and raving over Glocks or Barettas doesn't mean that's the one you're gonna be best with. Take your time and figure it out. Also figure out if you want a SemiAuto or a Revolver. Personally I don't like revolvers, but I know other people that are completely the opposite.
If you're looking for a gun in the $200-$400 range, you're gonna most likely be in the used market, but again it depends on what you're looking for. My little KelTec was under $300 brand new, Makarovs are the same. My Ruger was about $400. But Glocks and XDs are around $600 new and you could probably get them for around $400 used.