When you succeed in doing something but come really close to failing, you can say that you "just barely" did it. In the example:
I just barely made it back in time to return the car
...you did return the car on time but you almost did it too late. Another example:
I took French in high school, but I just barely passed it.
This means that you got a low grade which was passing, but close to failing.