I have the same laptop and I also had the same problem. After a lot of time troubleshooting I stumbled across the solution... My power cord was lose where it connected to my computer. I am now really careful to not move it or bump it while in use. It looked like I may have bent something, possibly when packing it up or hitting it against something else? I hope that the solution to your problem is just as easy.
Hi,
specs:
Gateway M505b2 laptop
this laptop which appears to be a sweet one was given to me by a friend to repair. Now the history of it is extremely vague. The Battery either didnt work or doesnt have a charge. I plugged in the power brick to the outlet and then to the laptop and tryed to power on. I removed the battery and readjusted the power jack into the laptop. To my suprise it turned on booted to win xp home sp2, i heard the speaker pop, (to my knowlegde, that is when the OS is loading the sound drivers... then poof it shuts off. My first reaction was that the power jack and the power brick where they meet into the laptop was loose and i killed the power. The next couple of minutes i figited with it to no avail.
Note: I believe that the power jack connector that is soudered into the motherboard was loose. But after carefully removing the laptop plastic case and items, i found that it seemed to still intact and working.
So now when i have the base essentials on board, ram, hdd, cpu, and power brick i press the power button and it will light up and turn on for a fraction of a second. so that is where i stop, because if i am not mistaken, my tower did that to me once, telling the the cpu was fryed? idk entirely. but still I would liek others oppinions on this please. I have been searching arround and contacted gateway for a service manaul or such to aid me, but unless i buy a cd off ebay, i cant get it, and i am weary of the ebay manuals.
last note, wheather or not if the battery is plugged in, and i connect the power brick to the laptop, the orange charge light will light up on the chassis of the laptop for a fraction of a second too. so taht was what lead to think there may be an issue with the connector, pwrbrick. Otherwise i thought i would just charge up the batt and try to boot. So there you are, I greatly appreiate any and all help and suggestions.
-ANdrew

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic