No matter how your opponent assigns damage, your opponent will gain four life when damage is dealt.
##Assigning damage
510.1. First, the active player announces how each attacking creature assigns its combat damage
702.19b The controller of an attacking creature with trample first assigns damage to the creature(s) blocking it. Once all those blocking creatures are assigned lethal damage, any remaining damage is assigned as its controller chooses among those blocking creatures and the player or planeswalker the creature is attacking
When trample damage is assigned, you must assign at least lethal to all blocking creatures, and any remaining can be assigned to the player or planeswalker. That means your opponent has the following options:
- Assign 3 to Liliana, and 1 to Liliana
- Assign 4 to Liliana
As you can see, the options in this case all add up to the same result: all four damage gets assigned to Liliana of the Veil.
##Dealing damage
510.2. Second, all combat damage that’s been assigned is dealt simultaneously
When the 4/4 lifelink trample creature deals damage, it deals four all at once, rather than dealing three followed by one. Simultaneously, its controller gains four life.
Note that because Liliana was dealt four damage in total, she loses four loyalty counters. This is because Liliana is still a planeswalker even though she is also an enchantment and a creature. Even if Liliana were indestructible, she would still die if she loses all of her loyalty. Gideon, Battle-Forged has an ability that specifically protects him from losing loyalty like this.