That size tank would last you a while with a gar, but would not be ok for the full life of a gar. You'd maybe get 12 months out of that tank, depending on species of gar.
Check the stickies for growth sizes for the different species of gar. As far as I know, there are no species of dwarf gar, and anyone trying to sell one as such either has stunted (unhealthy) animals or is lying about how big they'll get.