With experience, you'll learn the different tracks and how fast you can go with certain horsepowers. As a result, you'll be able to quickly adjust the gears based on your car and the track.
To make sure you've got it right, find the fastest part of the track and test it out. You want to almost redline in top gear just before you hit the brakes. On a track like Daytona, Indy, or Nurburgring, you'll need some extra gear to compensate for drafting.
There will be certain tracks where you'll wish certain gears are longer or shorter - so once the top speed is set, you can adjust gears singularly.