Anyone that tries to mess with Earth sooner or later runs into the Avengers. The World Eater is absolutely no exception to that rule.
The events that lead to Earth's Mightiest Heroes laying the smack down on the Great Destroyer were the result of his Rogue Herald Terrax's attempt to take Manhattan hostage. Galactus was too weak to feed anywhere else but Earth, causing him to confront Terrax. In doing so he drained the Power Cosmic and threw him off the World Trade Center.
In his weak state, he attempts to build a machine that will allow him to feed off of Earth's energy. While doing so, Reed Richards, Captain America, Iron Man, Thor, and Wasp ambush the Devourer of Worlds.
After an intense battle, they defeat the massive cosmic being ensuring Earth doesn't end up in his small intestines. It's hard to say if the group of Marvel heroes could have accomplished this if he wasn't so weak. In the end, if you win by an inch or you win by a mile, winning is winning.