There exist a physical theory called quantum mechanics which describes the Universe at atomic and subatomic length scales. Chemical systems, such as, for instance, molecules, are one types of systems one encounter at this level, and as such, they can in principle be completely described by quantum mechanics. What is meant by a "complete description" is that all the properties of a system (say, a molecule) can be theoretically predicted by the application of the principles of quantum mechanics.
However, the direct application of the principles of quantum mechanics to chemical systems is practically impossible in the absolute majority of cases due to the complexity of the resulting description. To simplify matters a series of approximation has to be introduced. But even the approximate description is usually too complex to be handled by a human being analytically (on a piece of paper), and thus, numerical methods has to be developed to shift this burden to our digital mates (computers). All these questions (approximations plus numerical treatments) are addressed by a branch of chemistry known as quantum chemistry.
GAMESS and Gaussian are indeed programs; programs that implement different methods of quantum chemistry. And just for your information there are a lot of other such programs. These programs allows us to calculate the properties of molecules, to predict their behaviour in different environments, etc. And all this can be done theoretically using computers without actually synthesising a molecule in question and then doing some real experiments on it. To understand what these programs do exactly, you have to spent a lot of years by learning some advanced mathematics, quantum physics, quantum chemistry, programming, numerical methods, ... At this point I can only tell you that they are doing some magic. The quantum magic.
 There are in fact 3 different programs: PC GAMESS (now Firefly), GAMESS (UK), and GAMESS (US).