Well for one is that the gunboat could chase the frigates and stuff into a lot of places a Battleship could not, harbours, up rivers (if I was a frigate I would be going anywhere I could to get a way from a dreadnought). But if I could do python I would give it a deadly bombardment capability, maybe be able to destruct buildings in cities or something.
It would also be easier to sneak up on pirates and stuff, much moreso than a battleship giving it an advantage in surprise. You see a dreadnought coming, one of you sacrifices yourself while the rest of you escape.
Matt... you need to reread your naval history books. You're giving waaaaaaaaaaay too much credit to gunboats... they're not all that and a bag of chips. I'd be hesitant to say they could even take-out an age-of-sail frigate, simply because I wouldn't want to be on the receiving end of a frigate's broadside in a tiny unarmored riverboat with a few guns on it.
Perhaps you're confusing gunboats with MTBs (PT Boats)... PT Boats have speed and good stand-off weapons (ie: torpedoes)... a gunboat is neither fast nor powerful, nor long-ranged... they were used more for police duties and shore bombardment then anything close to resembling naval battles.
You're also way undervalueing what a destroyer or battleship can do. Destroyers can run in fairly shallow waters... they're not exactly huge or require deep waters to run-in. They were used for very close/accurate direct fire support in WWII and beyond, and they'd easily go anywhere a massive (hard to maneuver) Ship of the Line could go.
Perhaps the FUNNIEST thing you said was that a Frigate could hide from a battleship and go in tiny nooks a battleship could not go...
Come on now... really...
I guess that frigate will feel really safe going a mile up-river on a battleship and looking out their telescope and going "hah... you can't get me a mile up-river you massive battleship you..."
At which point the radar-controlled, 20-mile range, volkswagon-sized-1-ton-shells of the battleship would simply ahnihilate them from well at sea with a well-placed broadside.
Matt... I hope you know that during the Gulf War the US Battleships were firing on Iraqi positions 20-miles inland from well out to see. When's the last time a frigate tried to hide 20-miles inland? I don't think your super gunboat can do that either.
I'm not even going to go into the "I see the battleship coming and I'm going to run" thought you did with age-of-sail ships... I hope you know, with a good wind, a sail ship from those days was lucky to do 15 knots. A dreadnought could do at least 20 knots and modern battleships 30 knots or more. We won't even discuss the ability to fire a broadside over the horizon.
Really Matt... you're going to have to do better then that to make me think a raft with some small guns nailed to the deck is better at whiping out old ships then a 45,000-ton modern battleship.