Gravity can contribute beyond horizons, but by this I have to carefully phrase it: the gravitational field contributes, but gravitational radiation does not.
You’re asking good enough questions that the simple analogies break down and we have to get to the “yes, but…” parts.
So, with a black hole, it is surrounded by a gravitational field by virtue of existing; this field is infinite and permeates space. In QFT, gauge bosons aren’t emitted from objects so much as they are excitations of the related fields.
So gravitons could not be “emitted” from beyond the event horizon; but because the gravitational field extends beyond it, and is informed by the mass of the hole itself, we still end up with gravity related to the hole’s mass.
This is also true of charged black holes (they have an electronagnetic field — nobody tell
@Native — and photons are the gauge bosons for EM force, so the question might arise, “how can a black hole have charge if photons can’t escape the event horizon?”). The answer is the same: photons can’t leave the event horizon, but the EM field can and does, and it can get excitations outside of the event horizon. So you can have a charge while also maintaining that photons don’t escape the horizon.
This is still a simplification (I mean we’re talking about quantum field theory here), but hopefully gives a good conception.