Freeze response is also a part of the fight or flight response. See this paragraph below from Wikipedia:
The fight-or-flight response (also called the fight, flight, freeze, or fawn response in post-traumatic stress disorder, hyperarousal, or the acute stress response) is a physiological reaction that occurs in response to a perceived harmful event, attack, or threat to survival.
This, being enough of a definitiin, does not explain the point in your question i.e. how could the freeze response help our ancestors in some dangerous situation (and thus become evolutionarily helpful)? Its actually quite simple. Let me first explain how the fight and flight responses would've helped us.
For the fight response, imagine a simple situation: a small animal (say, cat) runs towards you to attack you. Now, fight response immediately turns on. Hormones in your body tend to make you feel more powerful and aggressive, so that you easily fight off the cat and make it run away. This would be helpful for someone who would've otherwise done nothing and simply get a couple of injuries from a notorious cat.
In flight response, imagine a simlar situation: you are being attacked by a larger animal (say, bear). You know that you just can't fight with it, but if you run fast enough, you can outrun that bear. Now, flight response rapidly takes over. Hormones, like adrenaline and nor-adrenaline, tend to get more blood to your legs (so that you can run faster), dilate your pupils (so that you can see everything more clearly), etc., everything required for a faster sprint. This would be beneficial for someone who would otherwise not run away and reach a near-death situation.
So, how does the freeze response help? Consider another (last one) situation: you're being attacked by a lion. In this case, you know that you can neither fight with an angry lion nor outrun it. What should you do? One immediate idea would be to play a dead man's role in front of the lion so that (maybe) it will leave you. Of course, it doesn't pay off everytime, but surely it does, sometimes. And in such a case, this would be better for someone who would otherwise either try to fight with the lion or to outrun it. And, obviously, it is a better option for many other organisms too. So it indeed seems that this response developed much earlier in time, maybe even long before first chordates appeared.
With the above part explaining why it is beneficial, one part still remains i.e. how does it work? For this, see the paragraph below:
Studies show that particular connections from the periaqueductal grey (brain region located along the spine) to the pyramis at the base of your skull are integral to the freeze response. When these connections are activated, it causes the body to freeze. They can be activated by things that are actually dangerous and by things that aren’t, so even irrational fears can cause us to freeze. While giving a presentation, you might not actually be in danger, but your body responds like it is and causes you to clam up.
Below are images of the periaqueductal grey in spinal cord and pyramids in brainstem to help you understand their locations.
To conclude, freeze response is not a mere "remain" of our reptilian past, it is still beneficial for us.