A common problem with many Gateway and Emachines laptops is the power button itself. This might not be the whole problem but it could be a contributing factor in your case. Since you will be taking the laptop apart to check the heatsink anyway, you can check the power button with a multimeter.
There are two ways to check. The first is to use some temperature monitoring software to tell you what the CPU temperature is. While running the software, you might see the temperature reading increase until the computer shuts off. This will confirm what we already suspect.
The other way is to take the computer apart, remove the heat sink, apply fresh thermal compound, put it back together, and see if that improves anything.
It's possible that overheating is not the issue, but that tiny cracks in the motherboard are widened by expansion when it heats to a normal operating temperature.
I had an Emachines laptop that would slow down due to getting hot and I put a desk fan blowing air over it and this helped. (This was before I was confident enough to take the laptop apart) If you put a desk fan blowing air over it and it doesn't help, then it's probably not an issue with over-heating.