There're a few main ways about this.
First: Sideboard in anti-graveyard hate. For example if you're expecting the opponent to have Leyline of the Void, bring in something that can kill enchantments. The most common of these cards is Nature's Claim, because the most powerful graveyard hate cards are enchantments & artifacts (note how many of the hate cards you mention fall into this category).
Second: Against one-shot effects such as Surgical Extraction and Faerie Macabre, you play around graveyard hate by not using all your graveyard pieces at once. Try to get your graveyard to the point where the opponent needs to use their hate cards, but you haven't committed all of yours. For example, suppose you're playing Dredge and the most explosive play you have is to Cathartic Reunion to discard Stinkweed Imp and Golgari Thug. However if the opponent might have Faerie Macabre, that would result in a blowout. You play around this by not discarding both your dredgers, only one. If the opponent doesn't have Faerie Macabre, you expect to be able to generate enough value to overpower him anyway. If the opponent does have Faerie Macabre, you still have one dredger in hand.
This works because you should have more graveyard pieces than the opponent has hate cards.
Third: the last option you have is to transform. You switch from being a graveyard-based deck to one that isn't based on the graveyard much, if at all. This is the hardest thing to do because your maindeck is built around the graveyard, and you only have so many sideboard slots; however it has been done before.
Here are two examples.
This is a Modern dredge deck. Note the 4x Nature's Claim, 1x Abrupt Decay and 3x Ancient Grudge in the sideboard. These kill so many of the hate cards you mention, and in fact killing these hate cards are the main reason they're there.
This is a Vintage dredge deck with a transformational sideboard. Note the 3x Gurmag Angler and 4x Hollow One. Again, look at the hate cards you mention and see how effective they are against these cards. Hollow One can be cast for free with each Bazaar activation, and literally doesn't care about the graveyard. Gurmag Angler is impacted, but your opponent needs to stop the cards from going into the graveyard in the first place, which isn't trivial. They might have to use their graveyard hate simply because you are threatening to cast Angler even if you don't have it in hand. Cards like Leyline of the Void and Rest in Peace are still very effective, but Tormod's Crypt, Nihil Spellbomb etc are not, and Grafdigger's Cage doesn't do anything.
A final note: the two example decks above are completely focused on the graveyard; they pretty much cannot win if the opponent has e.g. Rest in Peace. Other decks you mention, such as Melira Pod and those based on Sun Titan, are impacted by graveyard hate but not by much. If you're playing one of those decks, consider just ignoring the graveyard hate and winning with the rest of your deck, or sideboarding out the graveyard components for generically good cards.
Edit: Former US Champion Oliver Tomajko wrote a primer on Modern Dredge that includes a section on how to play around graveyard hate; it's available here.