The only possible answer to your question is that it depends on the motherboard. The motherboard manual gives you the details about CPU's supported and what switches to set with each of these. I'm sure Gateway has used many types of motherboard in the last 5 years, so a more specific answer to your question isn't possible.
So: consult the documentation that came with the computer. If that doesn't tell enough contact Gateway technical support or see if their website contains the needed information. You'll surely need to know the model number of the PC. If you know the type of the motherboard, you can also visit the website of that maker (like Asus or Intel, or whatever it says).
If the above doesn't help: post the details of motherboard (there should be some identification on it) or Gateway model number on the hardware forum and see if anybody happens to have more info available then Gateway or Asus itself. This is definitely the wrong forum for a question like that.
Kees
i want to install a faster cpu without replacing the motherboard i have a gateway it currently has a intel celeron 500mhz cpu i have installed a 100gig hard drive and 256k memory how fast can i safely go with what i already have

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic