According to the cards, Gengar's gnawing curse states:
Whenever your opponent attaches an Energy card ***from their hand to 1 of their Pokémon,*** put 2 damage counters on that Pokémon.
And naganadel's charging up ability states:
Once during your turn (before your attack), you may attach a basic Energy card ***from your discard pile to this Pokémon.***
*** used for emphasis
Since the energy is supposed to be ATTACHED FROM THE DISCARD PILE and not THE HAND, there should be no damage incurred yet there is