Where are you setting EDITOR to gvim? Is it possible that you have set it somewhere like bashrc or bash_profile that would be picked up by bash, but maybe not by Gnome? I can't remember where to modify Gnome's environment so my question may be stupid.