Considering the movie Interstellar, I just did not understand how solving the equation saved the earth from the Blight. As I understood, the equation had to do with gravity. What was the relation of gravity with a massive infestation of a microorganism?
There's no indication that the equation saved the Earth from the Blight. The final scenes are based on a space station; Cooper Station and there's evidence from the novelisation that they're building and populating a series of stations by evacuating the Earth (presumably the equation somehow reduced the cost of attaining orbit, making this mass-exodus a realistic possibility).
Edmunds’ world didn’t have the same length day-and-night cycles as Earth, and since the eventual goal was to live there, Cooper Station — and her sister stations — were gradually modifying the length of each day. The human circadian rhythm had been the same for millions of years, and asking a body to change too quickly was generally considered to be a bad idea.
- Interstellar: Novelisation
Frankly, the strong implication is that (non-blight) life on Earth is doomed and nothing that Cooper did, nor their possession of the gravity equation has changed that fact.
The point of solving the gravity equation was to lower the Earth's gravity enough to make it possible to launch the really massive space colonies they had built, which were presumably large enough to carry some significant fraction (or all?) of the Earth's remaining population. See this answer for details. Meanwhile, for some reasonable speculations about how they could avoid taking the Blight with them on the space colonies (I don't think they ever cured it, just left it behind on Earth), see this answer.