It is best to make your gauge swatch much larger than the suggested gauge measurements. So if your pattern says that your gauge should be measured over 2"x2" you should make your swatch at least twice as big as that so you can measure the stitches in the middle of the swatch and avoid the edges in your measuring. This will give a more accurate measurement.
If after doing that your measurements are not right, you'll have to change your needle size.
[b]If you have too many stitches per inch you will have to go up in needle size.
If you have too few stitches per inch you will have to go down in needle size.[/b]
Hope this helps.