I know that even light can't escape from a black hole's gravity and the velocity of light and gravitational waves are the same. How can only gravitational waves escape from its gravity?
I see this phrase all the time, and I have to say I've come to greatly dislike it because it's a very bad misnomer. Nine times out of ten, when someone is talking about a black hole, they describe it as an object with such strong gravity that "not even light can escape".
However, this unqualified statement presents a strong misconception as to what black holes actually are and how they work and accomplishes nothing but confusing innocent bystanders such as yourself. The gravity of a black hole is no more or less strong than any other object in the universe. Black holes are not cosmic vacuums which use their powerful gravitational forces to suck up all nearby matter, light, etc. In fact, if you replaced our Sun with a black hole of exactly the same mass, all the planets in our system would go about orbiting exactly the same way and wouldn't notice a difference at all (aside from the mass extinction on Earth due to no longer receiving any energy from the Sun).
That being said, let's paint a better picture of what a black hole is and how it works. A black hole is a clump of mass which has become so massive that the gravitational force of that mass on itself, trying to pull it together, actually collapses the mass into a singularity. The singularity is a point-like region of space where all the mass becomes contained. Slightly outside this singularity, the physics gets weird. For example, if you're right next to this singularity, and you calculate the speed needed to get away from that singularity (e.g., you need to travel ~11 km/s to get away from Earth) you find a speed which is much greater than the speed of light. That's the origin of the phrase "not even light can escape". But, if you start farther away from the singularity, you need less speed to escape it because you feel less gravitational pull from it (gravity decreases with distance). This means, at some distance from the singularity, the speed of light actually is fast enough to escape the black hole. This distance is so important that scientists have given it a special name, the event horizon. It can get a lot more complicated than the simple picture I've painted above, but that's the general idea.
If you put all that together, then that tells you that any light which is outside the event horizon has no trouble escape the black hole. It is only the light inside this event horizon which cannot escape. Likewise, any gravitational waves outside the event horizon can escape just as easily. This is what the answer by StephenG meant by saying they were "outside" the black hole. By outside, he meant outside the event horizon. And it is true that as long as the creation of the gravitational wave happens outside the event horizon it will escape the black hole.
And just for reference of size, the supermassive black hole in the center of our galaxy, which is 4,000,000 times more massive than our Sun, has an event horizon which only extends ~10,000,000 km. That's barely out to the orbit of Mercury if it were in the position of our Sun. So you can see, it's not very hard to be outside the event horizon as the event horizon isn't that big in astronomical terms.
$\begingroup$ This answer is incorrect in one sense. Gravitational waves cannot escape from a black hole. It is correct in another sense in that the person who posed the question conflated gravitation and gravitational waves. Gravitational fields and gravitational radiation are two different things. $\endgroup$ Mar 2, 2017 at 20:55
$\begingroup$ i'm not crazy about StephenG's answer because it doesn't explain why gravitational waves are outside the event horizon. Thought experiment: suppose there were two black holes orbiting each other and they were so close that both of them were well within a mutual event horizon: Is that situation distinguishable from a regular (spinning) black hole ? answer would seem to be No, based on a BH being defined by mass, charge, and spin. ie: those three quantities do not leave room for gravitational waves. @DavidHammen thanks for your comment. is there a lay-person-digestible source for it ? $\endgroup$ Jan 23, 2019 at 4:38
$\begingroup$ @orionelenzil Comments are not a good place to have such a discussion. Feel free to ask a new question if you want. $\endgroup$– zephyrJan 24, 2019 at 19:44
Gravitational waves are a distortion of space-time outside the black hole. They don't have to escape, because they're already outside.
$\begingroup$ There is a nice animation on the wikipedia page of gravitational waves displaying when exactly during the merging process the waves are released. $\endgroup$ Jan 13, 2017 at 14:23