Drinking a gallon of water per day throughout the day should not be harmful but if you drink the gallon of water in too short of time then your body and kidneys cannot get rid of the water fast enough which could lead to kidney problems.
During the hot summer months I can sometimes drink around 1 gallon of water per day but it's not all at once but instead throughout the day which is okay.
It becomes a problem for your health and kidneys when you consume the gallon of water at once or too much at a time.
But keeping a gallon of water and drinking it throughout the day is not harmful and is good for you to stay hydrated.