This was a classic problem with the automatic tranny Elantras in 2001. So much so that there were a number of TSBs issued on the matter. The car's computer should have been flashed to correct the issue, but you may have to take it to a dealer to confirm that the update(s) were applied. If you are not the original owner, it is possible that the prior owner just ignored the problem and never thought to inquire with the dealer (the fix would have been free and still should be). You might wish to log on to the HMAservice. Com website that Hyundai maintains to see this and other bulletins that apply to this model year. There are other websites that offer TSB info, but some of them charge a fee.
If the updates have been applied and you are getting the issue anyhow, perhaps it is time for a transmission fluid flush (hard or delayed shifts may be a symptom of low or dirty fluid). Keep in mind that the fluid used in this tranny isn't stocked by many shops and isn't interchangeable with most of what is sold at the automotive retail shops. I had to special order mine from Hyundai when I had my '01 Elantra's transmission flushed. If you rule out all of the above, it is possible the transmission has been damaged by use of incorrect fluid and/or normal wear and tear.
Tuesday, January 27th, 2009 AT 10:24 PM