Did a bit of looking around and apparently power supply problems are a well-known issue on Gateway laptops (as they are on older Compaq ones).
I'd guess the same as Paul, that the problem is inside the laptop and the heat was from that, which is why the better cord hasn't melted.
Most of the time, it seems that the problem is the connection is weak, begins to move out of place, and eventually stops working. The repair for it is very simple (I did it on my Compaq) and involves opening it up, putting in a new power connector bit, and soldering it on in the right place.
One of the tell-tale signs for this kind of problem is that the laptop will charge if you wiggle the cord or pull it to the side a bit. Basically, it won't make the proper connection in the normal position, but if you move stuff around to suit where things have moved to it works (sorta).
If it's only been a year and a half since you bought it, and it's been a problem from the start, you should lodge a complaint with Gateway. (Though, from what I read, I'd be wary about sending it to them for repairs... there were more than a few horror stories where for a power supply issue, Gateway replaced peoples hard drives with smaller, cheaper units and didn't even tell them.) That might get the cost covered.
If you take the laptop to a local tech person, tell them to check the power supply connections inside the laptop. It's usually pretty easy to find (it's just the other side of the place you plug the cord into). They might need to order the connection piece (for the Compaq, it cost me about 50 cents for the piece and another $1.50 for shipping), and the labour involved should be under an hour.
There was talk of some sort of class action against Gateway for the problem, but I don't know where that stands right now.
Hope this helps!