Gesso is the initial coat applied onto a support (or surface) such as canvas or wood before you paint on it. The purpose of gesso is to protect the support from the paint, some of which contain components that could damage it. Gesso also provides the key (surface) for the paint to stick to and affects the absorbency of the support. Gesso dries to a matte, gritty surface that provides adhesion for the paint. To get a smoother finish, you can sand it.
Traditionally, gesso was used to prepare a canvas or other surface to protect the surface and ensure that oil paint would stick to it. Early gesso was made of rabbit-skin glue; if you've ever been into a studio where some of this is heating on a stove, you'll know why less smelly acrylic alternatives are popular.
Today, more people paint with acrylic paint and use acrylic gesso. Acrylic gesso contains an acrylic polymer medium that serves as a binder (rather than glue) along with chalk, a pigment (usually Titanium white), and chemicals used to keep the surface flexible and avoid fading.
Gesso comes in both student and artist grade. Student grade is, not surprisingly, less expensive; the difference in price is related to the ratio of pigment to filler. Artist grade contains more pigment which means it's thicker and more opaque; this means you need less of it to cover a canvas.
There are a variety of different commercial gessoes available, and in addition to choosing between student and artist grades you can also select based on:
Each type of gesso has its own benefits and drawbacks; most artists who use gesso experiment with different options.
While earlier forms of gesso were always white, newer types of gesso come in black, clear, and a range of other colors. It's also easy to mix any color into gesso to create a custom color.
It is perfectly possible to paint directly on a canvas or other surface without using a gesso primer, and many people do. At the other extreme, some artists apply multiple layers of gesso and even sand each layer to create an extremely smooth surface. The decision about whether or not to use gesso is personal; questions to consider include:
Most ready-made canvases are primed with an acrylic gesso and are suitable for both oils and acrylics. You can also get canvas primed with traditional gesso for oil paint only. The packaging on the canvas will tell you what type of primer was used.
If you're unsure whether a canvas is primed or not, compare the front and the back. Sometimes the color will make it immediately evident, otherwise look at whether the grain of the fabric has been filled in or not. If in doubt, give it another coat.