Accidentally punched villagers. Also killed a few to reduce the overflowing numbers (caused by 1.14.2 and its constant villager breeding.) Iron Golems would occasionally get aggressive and would attack me.
However, after respawning just nearby, they continue to attack me. They also seem to know where I am from an extremely far distance away, as well as on the other side of the solid walls built around my village.
It seems to be an issue of 1 Iron Golem being continuously aggressive, with the surrounding Iron Golems getting aggressive only seconds after seeing me.
(Perhaps if you trade with a villager or hold a rose, Iron Golems will become neutral again?)