Calculate if the major repair will get you another year or three out of the car without doing anything more major. Then divide by that many months and see what that 'car payment' looks like compared to what you'd be paying for a new car.
Looking at your update.....a 6 year old car (sold in 2012) with above average yearly miles on it, with a vague description of the problem that offers no evidence that it will be properly fixed for $3k. Assuming the car has no payments remaining on it, $3k is a car payment of $250 a month for one year. If you can get three more years out of it without putting any more into it other than gas, fluids, tire rotation and yearly inspections, you'll get that 'payment' down to about $85 a month and then it might be worth hanging onto it. But from what you said the problem is, I don't know that you might not have more serious problems. I'd be inclined to let it go now for what you can get for it and start over.
Read more for my approach to this.
I drove my '89 Accord for 20 years. Aside from routine maintenance that you will have on any car you keep beyond the initial 3 or so year warranty, I had three major repairs but not catastrophic like motor or transmission. They averaged about $1,200 each, and they happened at the 10, 13 and 16 year marks. Each time, I figured that if I could get one more year out of it, $100 a month was a cheap payment for a car that I still loved driving and still looked and ran great. And I got three years out of it before I had to put more serious money into it. Best thing I ever did, keeping that car 20 years, until the body was starting to eat through from road salt. I gave it to my brother in law and he drove it another four years and all he did was put tires on it.