Hi Debbie, Hope that by now you have found a resolution to your problem. Realize that you originally posted over a year ago. Reason for my response is to possibly help yourself and other Elantra owners; it was a cue from "Expert HT" posted on http://en.allexperts.com/q/Hyundai-Repair-815/P0302-Check-Engine-Code.htm which helped me to sort out a VERY perplexing problem with our 2002 Elantra GLS (5-speed). Took me 12 days and a loss of even MORE sanity to track down the problem. Was getting to the point of "throwing parts at the car". Our Elantra has been a very good vehicle overall, now with 95K miles by the way. Will note that we drove on some very rough ice for about 150miles this winter (Ohio). My experience has been that vibration can wreak havoc on sensors (etc.), or a large pothole impact for instance. Wife thought car was idling a bit rough but made no comment. Then on a routine trip the engine light came on, seemed to be running OK. Code P0302 only, which is similar to what you obtained. The problem with the P0302 (or 301-304) is that its a virtual "smorgasboard" of potential problems! Research revealed the following list of possibilities: 1) misfire; 2) wiring problems; 3) ignition/fuel system; 4) injector; 5) ECT/MAF (sic- the car does NOT have a mass airflow sensor, I think they meant MAP sensor which is combined with the IAT [intake air temp. sensor but the ECT is the engine coolant sensor and a separate entity]; 6) vacuum leak in intake system; 7) CKP (crankshaft position sensor faulty or faulty circuit; 8) faulty coil or plug wire; 9) Low compression due to blown head gasket, leaking valve or piston ring; 10) Low/high fuel pressure 11) ECM. WHEW! A notation is made that if any injector codes are present or pending as well, that area should receive attention/repair first.
During the 12 days spent trying to sort this out, car developed (or displayed) odd engine speed problems. Intermittent revs to 3000 on cold start, revving excessively between shifts, lack of engine braking upon downshifts. Power was generally good however. The idle seemed only slightly rough to me at times. ONLY upon coming to a COMPLETE stop would the rpm's drop to 600 or so; otherwise they were always near 1500 or greater. Cooling fans coming on for no clear reason when motor was warm.
I replaced or cleaned the following items (and tested the components where possible): 1) Plugs and wires; 2) Coil; 3)TPS; 4) CTS; 5) Thermostat; 6) carefully checked the IAT/MAP sensor and circuit and simply could not convince myself that there was a problem there; 7) applied new clamps to the two hoses running from the valve cover to the Intake plenum (which Hyundai calls a "surge tank). No luck, same problems!
Hence a return to "Expert HT's" comments about testing for vacuum leaks near the intake manifold by spraying something like carb cleaner near the gasket and looking for an increase in engine speed or a smoothing of idle. First did an inspection of the gasket flange, and to my amazement found what appeared to be a missing segment sure enough, over cyl#2 !! Just to verify that this could be a blown (or more likely inhaled - into the motor - UGH) portion of that gasket I ran a bare thin wire (about 22 gage) into the opening. Sure enough that portion of gasket (~1/2") was gone. Yet it made NO noise.
This is the first time I've seen a broken intake gasket. I have thoughts about the overall design of the intake support assembly, even the gasket (which has slender areas on the top), and wonder how often something like this is unknowingly affecting other Elantra/Hyundai owners? Daughter has an identical Elantra, and has not had any similar problems. Ironically the more I work on (these/our) "Elantrae", the more I've come to appreciate the overall build quality and design/serviceablity (and have recommended them to many people). We also own two Fords and one Pontiac by the way.
The reason for this post, besides possibly being of some help to yourself Debbie, is to "pass on" the favor of good folks like Expert HT and so many others who contribute time and effort to help others out via the web forums etc..
Hope this helps, Rick_N