You're not alone in this situation. It happens all the time. Where a rider with some experience buys a green horse, takes it home, and then finds they have bitten off more than they can chew. I don't mean to be offensive/rude/condescending, I hope this comes across as constructive. I'm not there so I can't say for sure what's going on, but this sounds like a situation I've seen a LOT. What it comes down to is you are too green for this horse, and this horse is too green for you, right now. He may have been good at home, in his comfort zone, regularly handled by someone he knows and has confidence in. But you have taken him out of that place, out of the routine, and is now being handled differently. You may not even notice you're handling him differently. There are tons of subtleties that happen even on the ground that effect the horse's opinion of you, and what he understands as acceptable/unacceptable. Many that can be very easily overlooked by a greener rider. (Not saying you are a novice green rider, just that there are areas in handling, particularly with young horses that you are likely inexperienced in.)
The best solution to this problem is to seek help of a trainer. Most ideally, it would be one at or that will come to your barn, will let you watch and eventually participate in the training. Each situation is different, but I've seen it work best when the horse gets a solid months training with the trainer, and then another month of training/lessons with the owner/rider where the trainer trains the rider what she has taught the horse, and can in essence train through the rider owner. From there ideally once or twice a week lessons for the next few months, and a couple weeks of straight training/lessons after any extended periods off (i.e. over the winter).
This sounds like a lot, maybe over kill, but honestly this is a recipe for success, and will save you a TON of head ache, body ache, and in the long run, money on correcting truly bad habits. I have seen over and over again people do some of this, and have it end poorly. Like they will send it for training for a month, take 2 or 3 lessons at the end of it, and then take the horse home. Who will be good for a couple weeks, and then start up old or new bad habits. Maybe they will take a lesson once a month, which will help a little, but eventually the horse figures a way around it until it gets to the point where the rider isn't able to handle the horse properly anyone. So it comes back for another month of training. Repeat.
It also isn't really fair to frequently ask the old owner for riding/handling advice. A little here and there (i.e. has the horse even ridden through water? Have you ever put side reins on him?), but things that he did fine when you tried him out are your responsibility now. I wish you the best of luck with your horse!