If your GMail account is setup in the iPhone's Mail app then you can't 'log off' - your only option is to delete the account, as the iPhone won't let you leave the account there but with no password.
If you access GMail through Safari, you can click the Sign Out button at the bottom.
Hello,
You can't log off as mentioned however you can turn the account off so nobody can access it. Settings>mail, contacts, calendars>gmail account name> turn off mail.
Thanks Julian & Slippery Dog.
However:
1) Deleting my gmail account seems extreme (but maybe it is easy to restore the account so I'll give it a try)
2) Turning it off in settings seems too mild since it can be turned on without
a password.
thanks again. I just bought my iPhone and figuring out how to use it isn't as simple as I had imaginged
Stan
The way the device is set up, if you are seriously worried about privacy, then don't lend it. Either that or restore it to factory fresh before you do. Anything and everything that IS on it at the time you lend it is accessible - just the way it is. Even if you log out of Safari, unless you clear all cookies and passwords every time you lend it, they can just log back in (assuming you are storing passwords).