Deathless Knight must be in your graveyard immediately after you gain life for its last ability to trigger. If you gain life due to damage from a source with lifelink, and that damage is dealt at the same time that lethal damage is dealt to Deathless Knight, it won't be in your graveyard until state-based actions are performed a moment later, and so the ability can't trigger.