Yes, animals do practice revenge. Chimps do it, for example. Macaques do it, too, although not directly: if they cannot attack the offender because he is much stronger, they would hurt someone weaker instead, sometimes the attacker’s relative.
Also, there are many documented cases of wounded animals chasing or ambushing their hunters in situations when it would be obviously more reasonable for those animals to run away or hide. Why they do it is unclear. In humans, revenge is usually an irrational manifestation of our innate desire for justice, which is also observed in many other primates and has evolved to enable social cooperation. We always want to reward altruistic behavior in others and punish them for excessive selfishness.