There have been two battles at Deep Space Nine.
The first one was in the episode, The Way of the Warrior. A changeling replaced General Martok, and convinced Gowron that the Cardassian government had been replaced by changelings. Before the Klingons had a chance to attack Cardassia, Captain Sisko brought the Cardassian government officials to DS9. The Klingons then attacked DS9. Eventually Sisko and Worf convinced Gowron that he couldn't win the battle.
The second battle was in the episode, Call to Arms. After Cardassia joined the Dominion, the Dominion was bringing ships through the wormhole, to the Alpha Quadrant. Starfleet considered this a threat, so they ordered Captain Sisko to place mines at the mouth of the wormhole. The Dominion attacked DS9 to try to stop them from mining the wormhole. The Federation succeeded in mining the wormhole, but had to retreat from DS9. At the end of the battle the Dominion controlled Deep Space Nine.