If the total of the [attack] roll plus modifiers equals or exceeds the target's Armor Class (AC), the attack hits. (PHB p.194, emphasis mine)
That's all you need to hit: nothing mentioned about damage.
The (excellent) question was raised: is it possible that immunity actually prevents the hit? Looking for a definition, today I learned that none of the PHB, MM, or DMG actually define immunity--it's just used in a plain-language sense.
That said, your scenario mentioned "immunity to damage" of a certain type. You're not immune to the attack, you're not immune to all effects, just to one particular effect: the damage. All else triggered on a hit--like your reaction or a lycanthrope's curse--is still viable.