I presume this is a Vasari starbase we're talking about (since TEC and Advent starbases can be attacked from outside of their weapon range. The moving starbase is definitely the most challenging to tackle, but there are a few options you have:
1) Brute Force:
The Vasari starbase lacks any area of effect attacks. It has only so many weapons ports and can attack only so many targets. Throw enough firepower at it, and you'll be able to bring it down. Unfortunately, for a heavily upgraded installation the kind of firepower you need is positively enormous, maybe 1000 command of fleet (though if you have the right support units in tow you can pull it off with less).
The danger here is that if you underestimate the level of force needed, you could take catastrophic casualties. In singleplayer, you can always reload (so this can actually be a good learning experience about the fighting power of starbases), but in multiplayer you get one shot so you have to do it right the first time. Good units to take down starbases include the Ogrov and Cielo for TEC, the Guardian and Progenitor (must have shield restore) work wonders for Advent, and for Vasari the Jarrasul with nano disassemblers is a miracle worker.
2) Bombers
As Ryat mentions, bombers work very well against starbases. Starbases cannot attack strike craft, and move slower than carriers. Simply move your carriers away from the starbase and their bombers can pepper it without ever taking a single shot in return. This is more difficult if the starbase has fighter or fleet support, but is still doable particularly if you have a numerical advantage.
3) Bypass
Sometimes, you don't need to take down the starbase at all. Just run past it and attack other planets behind the front lines. The AI rarely defends them well and you can easily gut its empire like this. Sure, it will keep a few front-line planets under control thanks to those starbases, but it's no longer a credible threat and you can pick them off at your discretion.