A series of gallic ester-based derivatives have been prepared, and their properties as organogelators have been evaluated. It was found that some of them exhibit efficient gelation of substituted/unsubstituted aniline. Interestingly, these organogelators could selectively gelate aniline derivatives from an aniline derivatives/water mixture, which can be suitably exploited in water purification. The morphological structures of the xerogels were investigated by SEM and TEM. The probable factors responsible for the self-assembly of this class of gelators have been studied with the help of XRD and FTIR spectroscopy.