WOW, things are really discombobulated here. If you had listed your model number, this would be a lot easier.
First, are you still covered by free support from Gateway, if so, that is the place to start.
Second, use another computer to view their HELP files on reinstalling XP for your model, if you can't use your laptop.
Do you have recovery disks, or is your recovery system loaded in a hidden partition, if in hidden partition, learn how to use them at Gateway or your user manual? If you have recovery disks, use them to reinstall Windows, if not, you may have to buy their recovery disks, usually less then $50.00.
If you can, as you say, go online, then try doing an online virus and spyware scan, such as trend Micro; http://www.trendmicro.com/cwshredder/
Can try this, boot up, disconnect form the Internet totally. Then run System File Checker; http://www.updatexp.com/scannow-sfc.html . You will need an XP installation disk, or your recovery disk, as you will be copying the Windows files from the I386 file to correct corrupted files. If your recovery disks are in a hidden partition, you will need to direct sfc to them, when it ask you to insert the disk, click on browse. You can open the physical disk by right clicking on the CD icon and clicking open or explore. Then look for the I386 file, that is the CD you need.
Start your research here; http://www.google.com/search?q=install%20laptop%20operating%20system&sourceid=groowe&ie=utf-8&oe=utf-8
http://www.google.com/search?q=install%20laptop%20operating%20system&sourceid=groowe&ie=utf-8&oe=utf-8
Gateway support; http://support.gateway.com/support/default.asp
Gateway parts; http://www.mundocorp.com/index.html
Make it a great day!