Gauge in knitting refers to the number of stitches and rows per inch and is crucial for ensuring that the finished piece matches the intended size and fit of a pattern. Achieving the correct gauge involves adjusting needle size or yarn weight to match the pattern's specifications, preventing discrepancies in the final product's dimensions.