The fact that the lines eventually disappeared suggest your computer was overheating. Overheating can trash your video hardware, not to mention other important bits. Make sure your fans are working using your install disk to run Apple Hardware Test. AHT will detect failed fan motors and failed heat sensors. Don't use the computer in your lap or on a blanket or pillow; get a lap board to avoid blocking the critical hinge area where cooling air is drawn in and heated air is exhausted.
Replacing the GPU means an entire logic board replacement. First, you can judge at home if the logic board is bad or just some of the display components, a cheaper repair.
Attach a "known-good" external monitor and restart. If you have to borrow a monitor, it is worth it. If the display defects also appear on the external monitor, then the logic board will need replacing. If the image is normal on the external, then the fault is in the dispaly itself, its inverter or the cabling. Cheaper.
Be aware that Apple Stores donot usually service products older than five years. You may be told that when you get to the Apple Store. In that case you can do two things:
1) Ask the Apple Store if your computer qualifies for a DEPOT REPAIR. For those, the store sends the computer to an central Apple refurb facility and they basically replace anything they find wrong inside for a flat fee, currently about $315US. That does not cover cosmetic or accidental damage damage to the display and case. In the US that repair takes about a week, maybe a little more with shipping, but your basically get a new comptuer back.
2) Find a Apple Authorized Service Provider (AASP) who still works on older models. The AASP may have trouble getting parts for an older model however.