I couldn't find an existing question asking this, and the accepted answer for How does training work? says:
I don't think your returning Pokémon is buffed or damaged, but I can't say for certain
So, do you need to heal your Pokemon after training in a Gym, i.e. are they damaged? Do you need to revive them?