Depend on the definition of "battleship", they never disappear in our world too. Because weapons are developped to fulfill roles in a combat doctrine, a countries that adopts a combat doctrine that requires a "battleship-esque" ship will built themselves a battleship. Consider the Soviet/Russian Kirov Class battlecruiser. It is big, carries a lot of weapon (instead of guns, they carry missiles), and its goal is to deliver a wallop of punch toward targets at sky, at sea, and underwater at the same time. Because Russia is self-sufficient, its combat doctrine is primarily defensive. Since their primary enemy is a US carrier strike group, Kirov would be used as the center of a Russian counter-strike group. In the battle, while Kirov will be launching missiles at US carriers and the submarines in the carrier strike group, the rest of the ships will protect it (while being supported by ground based bombers and missile batteries). And Russia is still using and upgrading Kirov right now.
If you somehow want the classic ships like the Iowa, the Missouri, or even the Yamato to be in a modern navy, then their armaments will need some upgrade, and they still might fulfill different function. Such as upgrading their main gun from using chemical to use electromagnetic power, adopt long-range missile (just like during the gulf-war), and use much better Anti-air. 527
But if it is just one ship, no matter how much anti-air you have on it, enough missiles will overwhelm it and sunk that huge thing. And the best railgun right now still can't match the range of the tomahawk missile.
I would say their size and armor in a more creative way. In red alert 3 there is a unit known as "assult destroyer". This ship has a special skill called black hole armor. What if these new ships are equipped not with guns, but with shielding equipments? Imagine when a US carrier strike group is being targeted by millions of missiles and artillery rounds while the Aegis system is fried by a powerful EMP. And suddenly these "Battleships" start broadcasting their own radar return to attract missiles toward them instead of the more vulnerable ships inthe group. The better armored "battleship" barely survives the hit, the carrier do its thing and eliminate the threat, mission accomplished. Similar tactics had been used by the Soviets in Afghanistan in 1980s. They use the more armored Mi-24 hind to be a meatshield for their more vulnerable tranport helicopter against the stinger missile fired by the Afghans. 898