Very simply, return him. There are better horses out there without the hassle. Even though he is still acclimating to you and his new surroundings, this behavior is unacceptable and as you fix this, another will pop up.
Honestly, it sounds like this is all handler error. The horse is just being a horse. He was good the first week and then figured out he could walk all over you because you don't establish yourself as the leader. Put him in a rope halter (it has more "bite" when you need it than a flat nylon halter) and carry a 4ft whip. Keep your posture straight, shoulders square, with strong confidence and give him a leading lesson. Anytime he stops and balks, use the whip at his hindquarters to encourage forward.
I have a mare that used to go for grass any chance she had and she still does with inexperienced handlers. However, she knows with me it isn't allowed so she stopped trying. Be consistent, stay calm. If the horse goes after grass when it is bitted up and you are riding, make him move into a faster gait or work in small circles. He will soon learn that nibbling earns him more work and it just isn't worth it.
If you do eventually get him in the barn then don't stop for the day, take him back out and try walking in again. It sounds like he is a brat... xD I don't let my horse eat grass on the lead rope cause then whenever I take him out all he wants to do is eat grass and when he doesnt get it then he gets mad. So don't feed him grass on the lead rope until he is walking in the barn smoothely and not putting up a fuss on everything he is asked to do. Maybe lunge him, right by the barn door where he is almost touching the barn door as he is going in circles... Or maybe feed him in the barn and try to walk him in. And when he does finally walk in make him think the barn is a GREAT place and that he should love going into it.