Although I think other people can speak with better experience it was a combination of factors.
The introduction of rifled cannons and much more powerful guns on battleships. With better metallurgy from the Industrial Age, more powerful guns during and after the American Civil War like the Armstrong Gun were made. Not only were the guns, breech loaded, but artillery guns were much more capable of firing larger and more powerful shells thanks to both rifling and the ability to contain larger blasts. Furthermore breech loading allowed for longer barrels, which combined with rifling and slower burning fuses contributed to guns with much higher velocity. In turn these guns would make short work of ironclads from much farther away. That said, in terms of effectiveness against ironclads, muzzle loaders were still effective if only because breech loading seals weren't fully developed. Nevertheless, the advances in metallurgy allowed for much larger guns that negated the armor of ironclads.
Advances in metallurgy: Like artillery, shipbuilding had moved on rather quickly from the peak of the ironclads. Although late era ironclads like the Dreadnought Class ships resembled the modern battleship to a good degree, ships that were newer were both faster and rapidly outpaced the older ironclads.
In truth Ironclads weren't really obselete as quickly as one would imagine. They lasted around 30 years in a time where field cannons would evolve in to field artillery, and muzzle loaded muskets soon became repeating rifles. This isn't to say that ironclads weren't massively permanent, but the Industrial Revolution facilitated a very large shift in doctrine with the ability to make much more lethal weapons in a very short time.
I ask any better informed AH users to fill in the blanks. :)