I recently became interested in galois cohomology, but I don't know if I have enough math to learn about it or where to start learning it. What should I know before I start learning about Galois cohomology and what books are good for self study?
1) One should know Galois theory. This is kind of obvious, but I want to stress here that you should also know Galois theory for infinite extensions, as this is often the case of interest for Galois cohomology
2) One should know algebraic number theory, including also the local theory. A good reference for this are for example the first two chapters of Neukirch's Algebraic Number Theory, but there are many other books on algebraic number theory. The reason is that this will give you a lot of examples of interesting Galois modules (which are the objects of study in Galois cohomology) and it is the basic study of the fields that are of interest in Galois representations or the Langlands program (which are your reason to study Galois cohomology, according to a comment from you.)
When you go deeper in algebraic number theory, you can also see one major application of Galois cohomology: class field theory (which is fundamental for Galois representatiosn or Langlands, it's the simplest case of Langlands in some way) can be proved by methods from Galois cohomology. (I would guess this is the first encounter with Galois cohomology for a lot of number theorists.)
3) One should have some familiarity with basic homological algebra. This is not stricty necessary, as for group cohomology, one can carry out the constructions explicitly with cocycles and coboundaries, but having a bit of knowledge about derived functors can be very clarifying. Standard references are Rotman's "Introduction to Homological Algebra" and Weibel's book of the same name. Both also have a section on group cohomology.
4) This is more optional, but there's a beautitful and useful connection between Galois cohomology and the theory of Brauer groups, so knowing the basics on central simple algebras over a field will allow you to appreciate that and give you a concrete description of some important Galois cohomology group. You can also learn this along the way of learning Galois cohomology. A reference is Farb/Dennis Noncommutative Algebra. They introduce the necessary group cohomology to explain this connection.
5) This is also optional, but knowing some algebraic topology can give you a different, much more geometric perspective on group cohomology and give you a different motivation for stuff like "cup products", "Künneth formulas" or "Universal coefficient theorems".