Contraception injection

The contraception injection was a form of birth control used in the Federation. The medicine had to be administered regularly, otherwise sexual intercourse could lead to fertilization and pregnancy.

During negotiations with the Gideon, Captain Kirk proposed that the Federation could provide any type of devices they needed to safely prevent conception. 

In 2375, Benjamin Sisko, preoccupied by the latter stages of the Dominion War, forgot to renew his injection, despite repeated reminders from his CMO, Julian Bashir. As a result, his wife, Kasidy Yates, became pregnant with their child, the couple's first. 

Background information
In The Making of Star Trek, it is stated that the birth control practiced on board the USS Enterprise (NCC-1701) was never discussed in any episode of The Original Series because the censors would not have allowed it. But if it were to have been discussed, they would have explained contraception to be based on monthly injections mandatory for unmarried women and voluntary for married women. If a member of the crew became pregnant, she would have a choice between medical discharge or rotation to a shore base for the duration of the pregnancy. (pages 206, 207)

The contraception injection mentioned in "The Dogs of War" would appear to be a binary compound, as it is implied that it was only Captain Sisko that failed to take his injection, not Kasidy Yates, who seemed adamant that she hadn't forgotten hers. This would suggest that both partners are required to take the injection in order to prevent conception.