basically you gear it so that you hit top speed at the fastest poing on the track without much to spare
if you gear too low you'll get halfway down the fastest straight in 6th gear redline and lose time
if you gear too high you won't be getting as much acceleration
also experienced racers play with gearing to alter shift points