I believe this is Marvel Adventures: The Avengers #26
It's the bottom of the ninth, the Avengers are down by two, two strikes down and bases loaded. The stakes for the Cosmic Pennant have never been higher. How will Galactus call this one? Okay... we admit. We have no idea what's going on in this story. Kirk drew the cover, and now Parker has to come up with something. THAT'S GOOD COMICS!!!
The weapon in question is the Ultimate Nullifier
Galactus, of course, isn't easily swayed. He's hungry, he wants a planet, and he finds inhabited worlds particularly satisfying. The aliens know from Earth history that Galactus was once swayed away from the planet by being bribed with the extraordinarily powerful Ultimate Nullifier, but even after Ant-Man manages to steal the device from Galactus' ship, the Devourer of Worlds isn't worried. He's now convinced that the Avengers wouldn't dare actually use such a device, as it would end life as they know it. Spider-Man calls his bluff, because he's Spider-Man, and activates the Nullifier.
FWIW, I found it via a Google search for ant-man spider-man galactus, which brought up the panel, as well as one of Ant-Man declaring, "The Ultimate Nullifier!", which led to me adding that to the search query, which mentioned the issue. From there, I just looked for reviews of said issue to get more details.