Yes the spell will be on cooldown even if you are offline.
Avatar Cooldown works similar to Familiar Cooldown: As an active spell, when you cast it, the cooldown starts even if you log out the game. If you log out transformed into Avatar, you will log in still transformed.
The difference between Avatar and Gift of Life (GoF) is because GoF is a passive abilit (You can add it to your action bar by clicking in "Add passive ability").