If you know, Iron Golems you make will not get angry at you. So I don't know your problem.
Yeah, I also was under the impression that a player-created golem would never attack a player (at least not the player who created it, not sure about other players since I mainly play SP), under any circumstances. Are you sure you're not logged in as a different player, or something? Regardless, try pouring some water on his feet. Contact with water will (should) render golems passive and immobile, and reset their hostility toward players. They will not move nor attack anything or anyone while in the water, and once you pick it back up (or push him out of the water) they should be neutral towards you again.
Also, I'm not exactly sure how it works with the new(-ish) village "reputation" system. It used to be that, if you attacked a golem or a nearby villager, the golem would aggro on you, but running away (roughly 16 blocks, I think, but I never measured it) would set them back to neutral. Now, it's different. When you attack a golem or villager, the golem will hit you one time (if it's right next to you) but then go neutral again, unless the attack brought your reputation in the village below -15. When your reputation falls below -15 in a village, all naturally-spawned golems in that village will become hostile towards you without further provocation, until you manage to raise it back up to -14 or higher.
In the future, don't waste your iron building golems with it. They're not all that helpful, and you basically just waste the iron. Instead, you should set up an artificial village to constantly spawn the golems and then kill them for their ingots. Instead of dumping ingots into building golems, you can harvest them for ingots and get free iron!
To make him not angry at you, you have to speak to him in a very smoothing tone to calm him down. Try to stay away from topics such as life struggles and sad things. Then, when he's calm enough, take him to a nice dinner. Usually the nearest Italian restaurant works for me. Unless he orders the most expensive thing on the menu, drive him home, and give him a nice rose or other flower, and ask him whether he would go out with you. If he says no, drop him off in the middle of nowhere, not to be seen again. If he says yes, plan a date or something. Since Iron Golems love drama, at about midnight start texting him about how it won't work out, and that you're cheating on him. He'll start going nuts, and the town police will put him in an insane asylum. He'll be happy there, reading picture books for the rest of his life. That's how to un-aggravate an Iron Golem.
Hope this helps!
Make a lava pit, lure the iron golem in and make sure it does. Download mc edit, place 4 iron blocks in your world, and set them up in a T shaped formation to create another golem. I know it sounds like cheating, but it was the only thing I could do.
Wait until nighttime. When it chases you at night lead it to a baddie, i.e. a spider or zomie or something. When the baddie attacks it it will attack it back. After it attack the bad guys you should be fine. Was looking up the answer myself and had this happen less then two minutes into reading answers so it should work. It's may 11th 2019 so try it out.
Since this ancient thread has been revived I thought I’d mention that my main 1.14 village has around 30 golems now and I often hit one by mistake while harvesting crops. I immediately run for the hills, jumping over the fence enclosing the village to safety. I only have to circle the village and approach from the other side and the golem has lost aggro.