Your question reminds me of this question on quora, which is about physics, but is pretty relevant to math as well. To summarize the many good answers there, no, you're not supposed to remember every single detail of everything you learned in college (ok, I guess there are people with eidetic memories, but not every person with an eidetic memory is in research, and not every successful person in research has an eidetic memory). If you learned something well, as in understood it and didn't just memorize it, it will come back to you when you need it (and it will take less time to understand it the next time).
In fact, preparing for the math subject GRE, which you should take if you are planning on graduate school in mathematics in the US, was really helpful for me to recall a lot of the information I had managed to forget as an undergraduate. It also made a lot of connections between fields clear to me. (Of course I have now forgotten it all again!)
Mostly, you should aim to remember the major theorems, and a general idea of how they are proved and how it fits into the 'big picture'. It is okay to not remember every single detail of every proof.
Usually one spends the first year of a PhD program in mathematics taking courses in a number of areas (algebra, analysis, and topology where I went to grad school), and then one is expected to pass qualifying exams based on those first-year courses -- the advanced students who already know the material for these courses coming in will likely get the opportunity to take the quals early. In some sense the idea here is that regardless of what your thesis eventually turns out to be, every math PhD student should know about, say, the fundamental group, or Grobner bases. After passing quals, one tends to become more and more specialized, usually this means we forget a lot of what the first-year courses covered, but again, since we learned it well enough to pass quals once, this means that in research you get a sneaking suspicion like 'this smells like covering spaces', and then you go back and remind yourself of all the stuff about covering spaces you had learned back in the day.
Anyway, the point is that at least at the beginning of a graduate program you are expected to learn a number of things in a number of areas, and most likely demonstrate this by passing qualifying exams of some form. Then as you get more specialized, many things get forgotten, but you usually remember enough to know where to look things up when needed.