Sefer Chavakuk (Habakkuk) is the book of the prophecies of Chavakuk the navi (prophet), one of the books of the Neviim Acharonim (the Later Prophets). It is one of the Trei Asar (the Twelve), the twelve short books of the Neviim that, the Gemara says (Bava Batra 14b), are written together as one sefer. The book does not name a king or give a date.
The book opens with Chavakuk's complaint to Hashem. Violence and injustice are everywhere, the wicked hem in the righteous, and Hashem does not seem to answer. Hashem replies that He is raising up the Kasdim (Chaldeans, the people of Bavel, Babylon), a swift and cruel nation that will sweep across the earth. Then Chavakuk asks how Hashem, whose eyes cannot bear to look at evil, can let the Kasdim swallow nations more righteous than they are and worship their own nets.
Hashem tells Chavakuk to write the vision plainly, because it will come at its set time, and the tzaddik (righteous one) lives by his faith. (The Gemara, Makkot 24a, says that Chavakuk summed up the mitzvot in this one principle.) A taunt of five woes follows against the conqueror who plunders nations, builds with bloodshed and trusts in idols, while Hashem is in His holy heichal (sanctuary) and the whole earth is silent before Him.
Perek 3 is a tefillah (prayer) in the form of a song. Chavakuk describes Hashem going out in power to save His people. He declares that even if the fig, the vine and the olive fail and the flocks are gone, he will rejoice in Hashem.
Sefer Chavakuk has three perakim. Perek 3 is the haftarah of the second day of Shavuot.