If you lose a battle, you will have an option to revive your units using Gems. After the revival, all the units health will be 100%. At the same time, the enemy's health will remain at the same percentage point as when the previous battle ended. Moreover, any enemy unit that died in the previous battle will remain dead.