You need an LCD and Digitizer. My understanding is the glass is cracked and the gray lines you see are actually damage to the LCD screen underneath.
You can buy and entire midframe assembly with glass, LCD, home button, proximity sensor assembly all pre-assembled on eBay and this would be the best route if you are not mechanically inclined. However you may not be getting "orignal" Apple parts, so read carefully. Always look for OEM or original quality assemblies if available, there are a bunch of garbage 3rd party parts out there so beware of imitators, calling it junk is an understatement! Also, not all that say "OEM" actually are. Look for words like "Genuine" or "Original" in the listing and the Apple name (properly spelled too, APPIE doesn't count!) will be on some components.
If you buy just the digitizer (with 3M adhesive) and LCD this will be least expensive route to repair (probably have about $75 invested for both "genuine Apple quality" on eBay), but you'll be in for some skilled disassembly to get the old digitizer from the midframe without damaging the rubber dust seal or other components of the midframe. FYI... I have an iPhone repair shop in Columbus OH. and I charge $150 parts and labor to replace both LCD and Digitizer on the 3Gs with 100% genuine Apple parts. Yes 1/2 that cost is labor, it will take time and patience to do it right!
Again I can't stress enough the importance of "original" or "true OEM" high quality parts. I have a over 3 years experience now and have worked with many vendors learning the hard way about variances in parts quality. Your digitizer should bear the Apple name on the flex cable. Look closely at photos before buying anything from eBay and stick with US sellers to avoid long shipping times and return hassles if you receive damaged goods.