If your expected gravity is based on 5 gallons, and you get 4 into the fermenter, your gravity is most probably higher due to concentrating the wort. Adding the correct amount of water to obtain the original volume should bring the gravity back to the estimated value.
Conversely, if you start with say, 6.5 gallons, your pre-boil gravity will be low. But by boiling down to 5 gallons, it should be really close to estimated. It's just two different ways to skin the same cat.
Taking gravity readings during the process allows you to adjust for high or low values.