There were basically three ways to deal with SAMs: evade them; electronically jam or mislead the tracking radar and guidance signals; and destroy the sites. Evading them was iffy and required a visual sighting soon enough to do so. Jamming or misleading the tracking and guidance was only somewhat effective. Destroying the sites with conventional attacks was problematic because they were heavily defended with an array of radar-directed and barrage-type antiaircraft guns.
Another method of destroying the SAM capability was the use of an Anti-Radiation Missile (ARM), which was fired well outside of the SAM site's conventional AAA defenses, homed in on its tracking radar, and destroyed it. The Navy had already developed an ARM using its Sparrow missile combined with a radar-homing seeker. This was designated the AGM-45 Shrike and was usually fired from the Douglas A-4 Skyhawk.
These Navy missions received the nickname Iron Hand after the original operation. (The corresponding USAF aircraft were known as Wild Weasels.)
The only problem was, the Shrike's range was significantly less than that of the Russian SA-2 SAM, making an Iron Hand attack too much of a fair fight. The next ARM was therefore a modification of a big Navy ship-launched Surface-to-Air Missile, which resulted in the AGM-78 Standard ARM. Since it weighed almost 1,400 lbs, it had to be carried by the Grumman A-6 Intruder.
Rick Morgan has written two posts which describe the history of the various A-6 "Iron Hand" derivatives: