Yeah, you REALLY need to level up before going to the Temple of the Ancients, otherwise you're screwed. I had the same problem the first time I played. Demon's Gate is a pain in the butt. Hopefully this will help:

His HP is 10,000. Guides suggest using Big Guard to protect the team. Have Vinny or Barret with you, or use Long Range Materia. His attacks are strong so you want to stay in the back row, while using powerful, long range attacks. Try to go into battle with everyone's Limit Break Gauges full. Use physical attacks and Limit Breaks most. If you do use magic, then use Summons: Bahamut and Odin work best. If you HAVE to use spells, then just make sure you don't use Gravity or Poision, 'cause he is immune. Make sure you have a good healer on the team, and have them heal anyone whose health goes below 600 HP. When it gets to 600, if Demon's Gate targets one character, they'll likey die.