Is it ok to drink a gallon of water a day?

No harm. A little time consuming but no harm likely as long as your kidneys and heart are working fine. Not sure why you would want to do this however. Are you doing it because your body requires it (you are thirsty all the time?) if so then you might consider that you have diabetes or a rare condition called diabetes insipidus. However if this is just your choice, then you will do no harm.