Gauge is a general goal to obtain for a uniform size, taking into account each knitter knits at a different tension, may choose a yarn with slightly different charateristics, etc.
In which way was your gauge off, were you getting too many or too few stitches per inch? You can try a different needle size (larger needle if you need to fewer stitches per inch, smaller needle to get more stitches per inch) to obtain the gauge the pattern calls for. For example, the gauge calls for 5 stiches per inch, and you're getting 4, try a smaller needle. If it calls for 5 and you're getting 6, try a larger needle.