For example, if an Festerhide Boar that had two counters on it goes to the graveyard after having been dealt damage by Abattoir Ghoul the controller of the Ghoul will gain five life. The Festerhide Boar card itself has a toughness of three, but what matters is the toughness of the creature that was represented by this card.
Here’s another example. Let’s say that the Abattoir Ghoul deals three damage to a Loxodon Wayfarer. If the Wayfarer later has its power and toughness lowered by -4/-4 from the morbid enters the battlefield triggered ability of a Morkrut Banshee, then only one life will be gained by the Ghoul’s controller. This is because when the Wayfarer was last in play it had a toughness of one. It does not matter that the Ghoul dealt three points of damage to the Wayfarer or that the Wayfarer did have a toughness of five at one point.
One final note, the Abattoir Ghoul itself must be in play in order for its ability to trigger. If the Ghoul deals damage to a creature but the Ghoul is destroyed before the damaged creature goes to the graveyard then the ability will not trigger and no life will be gained.