This can be done by going to your minecraft save folder and opening world/data/villages.dat in NBTExplorer. Then from there navigate to villages/players, find entry with your name and change "S: <some number>" to something greater than -15. At <=-15 the golems will keep on killing you.
I fixed this by using NBTExplorer (http://www.minecraftforum.net/topic/840677-nbtexplorer-nbt-editor-for-windows-and-mac/) to reset my reputation in the village. Looks like it wasn't being reset after leaving for a while.
This can be done by going to your minecraft save folder and opening world/data/villages.dat in NBTExplorer. Then from there navigate to villages/players, find entry with your name and change "S: <some number>" to something greater than -15. At <=-15 the golems will keep on killing you.