I'm not a great expert on guns. But I am quite capable with whichever one you throw at me. And I've been thinking about the guns I should have in case of emergency.
1. .22 pistol
This should go without saying. A .22 pistol is good for practice and lots of other uses. A .22 would be your utility pistol for all small jobs, and would probably get more use than any of your other guns. They can be small and concealable. They are good for hunting squirrels and rabbits. They are capable, though not recommended, for defending yourself from other people. The ammunition is very plentiful and cheap as well.
Either a revolver or semi-automatic is fine.
A .17 HMR pistol would be fine as well, but you would need to store a lot more rounds because they are not as readily available as are .22s.
2. A Big Revolver
When the world goes to heck, a reliable handgun would be very useful. A semiautomatic pistol has many more moving parts, and is therefore much more likely to break.
A good revolver, in at least a .40 caliber, could be your primary source of defense.
3. A Shotgun
Hunting small game and birds is often easier with a shotgun rather than a rifle. A semi-automatic, or pump, shotgun would be an excellent choice for defending yourself from lots of people, or animals. A double barreled shotgun is simpler and less likely to break however.
A 12 gauge is what you'll want in any case.
4. A Bolt Action Rifle
A hunting rifle, it should have a scope and open sights in a survival situation, is the perfect tool for killing at a distance. .308 Winchester is all the cartridge you need, plus its much lighter and smaller than the ballisticly comparable options.
5. A Semi-Automatic Rifle
If you really need to defend yourself from a lot of enemies a semi-automatic rifle is a fine choice. Although most of them seem to be chambered in .223, which is what the military uses, but its a bit small for my taste.
If you have lots, and lots, of enemies then you'll need a semi-automatic. But I'm more fond of a large calibered (.45-70 government) lever action. If you really need more than a big lever gun, it may be too late for you anyway.
6. A .22 Rifle
For more utility work, and most hunting is survival situations you'll want a good .22 rifle. A semi-automatic, bolt, or lever action .22 may become your primary hunting tool.
In a survival scenario you'll want to remember to have enough ammunition for your weapons. Without bullets all these guns are nothing more than awkward clubs. The more guns you have with different ammunition the more complicated finding the right one will be. Buying several guns that shoot the same ammunition will simplify your arrangements.
Don't forget to have lots of cleaning equipment as well. A fouled gun will be more dangerous than helpful.
No matter how many guns you have, it is the skill with them that will make the difference in a survival situation. You could have a dozen of each of the six guns that I listed and you'd be less dangerous than the guy who's skilled with any one of them.
Beware the man with one gun.