Although alligators typically do not climb trees as they live in water and only come onto land for shorter periods of time to hunt and to bask (they normally wait for birds and ducks etc. to come to them) they are able to climb a tree if they choose to do so.
An alligator climbing a tree is very uncommon, however it has been done. Therefore if you are being chased by an alligator and think that it is safe to climb a tree to escape, unfortunately you are probably wrong and if the creature wants to get to you bad enough he will climb the tree to reach you.
The exception to alligators climbing trees of course is that the trees are not straight up and down or really tall. Contrary to what many people may believe, alligators are able to run, jump, and climb. They are equipped with strong claws and powerful tails that help them throw themselves upward, making climbing trees (especially slanted trees) quite simple.