Gauge is the number of stitches and rows per every inch. It is important because it determines if your project will look like the pattern sample or be too large or too small. For instance, if your pattern calls for a gauge of 3 sts/in and you are knitting at 4 sts per inch, your gauge would be too small, so you would needle to use bigger needles to get a looser gauge.
Gauge in Knitting Patterns
Knitting patterns have multiple ways of noting the gauge. Most patternswill at least tell you the number of stitches per inch, and many of the knit patterns will give you the number of rows per inch as well. Sometimes, instead of stitches per inch (often abbreviated as sts/inch), the gauge will be measured over 4 inches in the pattern.
Gauge is typically formatted like this in a knitting pattern : Gauge: 16 sts = 4" inches in stockinette stitch using larger needles.
This means that the number of stitches per inch that you are looking for is 4 (16 stitches divided by 4 inches equals 4 stitches per inch). The gauge will also direct attention to the pattern used, particularly if there are different patterns (ribbing, stockinette stitch, lace, different sizes of needles, etc), since the type of pattern you are using effects the gauge. To illustrate, ribbing tends to "pull in" more than stockinette stitch, while lace will have less stitches/inch because of the yarn overs.
What do I Need to Measure Gauge?
You can use a tape measure or ruler to figure out gauge, but a knitting gauge is a handy tool that usually has a ruler and knitting needle sizes- great for when they sizes rub out of your knitting needles.
A basic knitting needle gauge can be had for just a couple dollars at most yarn and craft stores, and are made of easily bent metal (but I have ones that are quite old and still work fine). Plastic, especially clear plastic gauges are helpful as well, and tend to cost about the same as metal gauges. Fancier gauges and small ones also exist, but are often harder to use, but can be quite cute, like ones that are shaped like sheep.
Very small ones often only have 2 inch measurement tools , which is fine if you need the tool packed in to a kit carried in a bag and space is limited, but I prefer the 4-6 inch measurements.
How to Count Stitches for Stitches per Inch
Using a ruler or stitch gauge, measure across at least 2 inches of your knit swatch, and divide by the number of inches. Measure in a few places to be sure you have an accurate measurement. For example, if you have 5 stitches over 2 inches you have 2.5 stitches per inch.
How to Count Rows to Get Row Gauge
Same as above, but measure the number of rows per inch- especially easy in stockinette stitch, just measure the "v" shape!
To learn more watch the measuring gauge in knitting videos. The videos cover how to measure trickier gauges as well- in addition to measuring gauge for handspun.