Does one need to learn set theory before learning category theory? I am having a course in Algebraic Topology and learning some basic category theory. But I only have a very limited understanding of basic set theory. I have no idea what is ZFC, and stuff like that. Thus, I find it hard to understand some motivation of the category theory.

My question is: does one need to learn some rigorous basic set theory before learning about category theory? If yes, do you have any recommendations?
I don't think you really need to go to formal set theory in order to understand category theory. What you need of course is basic understanding of what sets and functions are, nothing more then it is needed to understand algebra and topology (which I assume you know otherwise why taking a course in algebraic topology) :D

That said, you have to understand that category theory was born in algebraic topology and homological algebra, not for the sake of set theory.

Category theory is an abstract framework where is possible to study with the right level of generality(abstraction) many phenomena occurring in different context like topology, algebra and geometry.
In particular in category theory you can define in a uniform way what are products, coproducts and many other general constructions which arise in different fields in mathematics.

In order to understand category theory can be good having some background knowledge in algebra, geometry, topology (etc) in order to have a good list of example one can use when learning categorical concepts, although not strictly necessary. Take a look to Awodey's Category theory for an introduction on category theory with very low prerequisites.

Having some knowledge in set theory can help in finding some other interesting examples (and applications of category theory) but it is not really fundamental (at least if you ignore size issues, something many mathematicians do).
If I were you, I will "learn" set theory as much as I can. Take a course in set theory at your university and do well in that class, then take the second course before learning category. The set theory knowledge you need to master should allow you to do higher level analysis, higher modern algebra, and even topology which are required for you to become a mathematician. Cathegory theory is used to study higher modern algebra and higher number theory and that is where it will take you.