What is factory reset?
First, the word "factory reset" might be a bit misleading -- as one can easily tell by your first comment to your question: If the device ships with Gingerbread (Android 2.3.x) pre-installed, and after a while offers an update to e.g. Ice Cream Sandwhich (Android 4.0.x) which you perform -- a factory-reset thereafter will not reset it to Gingerbread.
To understand what happens at a factory reset, you need to know some of the way Android's file system works. To make that easier to understand, I will abstract (and simplify) this a bit:
There are multiple partitions created on the storage of the device. A few examples include:
/system, which normally is "read-only". Here the Android System incl. its pre-installed apps reside
/data, which is "read/write". Here go all the user's data, incl. the apps (s)he installs
There are some more partitions, which I will ignore for this example. With a new device,
/system contains the Android system plus pre-installed apps, as stated above -- while
/data is empty. That's the "factory state", we could say. Now you switch your device on, and go through the wizard: creating/configuring your account etc. These data are stored in
/data. So will the apps you download from the playstore, etc.
A factory reset now will return your device to "factory state": it will wipe all data it can.
/data is read/write, it will get wiped.
/system is read-only, so it won't get wiped. This includes the pre-installed apps.
- Your Google Account data have been stored in
/data, so they will get wiped
- Apps you have installed from the playstore were stored in
/data, including their settings and data -- so they will be gone as well.
The Google Account linked
As you can see from above description, a factory-reset will "unlink" the connected Google Account. In my eyes, that's like I want to delete a file: sure, when I format the entire disk the file is gone... So there must be other ways which keep your data intact.
At least in earlier versions of Android, there was a different approach (not sure if that still works, though). As a factory-reset as the "last ressort" would either delete all your personal data, it does no harm to try the following in advance: If it still works, great -- if it doesn't, you still can do the reset:
- from your homescreen, open Settings → Apps → Manage Apps
- one after the other, open all Google apps you can find (GMail, Playstore, GTalk, Google storage...) and press the "Delete Cache" plus "Delete Data" buttons. If they are greyed out, you might need to "force stop" the app first (there's another button for that)
- reboot your device
If this trick still works, your account should be gone by now; maybe even the wizard will pop-up again automatically.
One thing to keep in mind when changing the linked Google Account are your payed apps. They are bound to the account you've bought them with -- so they might stop working when that account is no longer there, and most will do so. If you no longer want to use your old account, you need to buy them again.