Hm. I cant speak to your exact situation, but my $4k Hyundai is in the repairs stage. I'm probably looking at $1k of repairs to get it back to perfect condition (already $600 in). My logic is this: think of all the possible repairs needed, add up the cost. If I can buy a good car for that, do it. If not, repair this one.
For me, 1k couldn't get me a car as good as the one I have, so I stay to the repairs.
I'd say take it to a mechanic you really really trust (or search for one with rave reviews) and have them do a very thorough check of the whole thing and quote you on all the repairs and maintenance it needs. If you think you could just buy a car again for that amount, do it. If not, do the repairs. Honestly, the repairs are probably going to be the way to go unless something really nasty is going on. (Eg needs a whole new engine)
And $500 in repairs isn't unheard of. It's not a lot especially for a used car. Thats like a set of tires or brakes, which any used car might need. I mean, you could buy a brand new car, and it's only a matter of time till you get hit with a big repair. So I wouldn't fret the $500 in repairs so far. That seems pretty par for the course.