When you encounter the Dark Elf as part of the storyline, if you didn't already obtain a key item from the castle by the dungeon, then you will be unable to beat him.
After you obtain the key item, fight the elf. For the first half of the fight only use your attacks. Do not heal or use items because your party will be wiped no matter what. You'll be given a chance to re-equip all your gear, and then the second half of the fight should be very easy.