Apparently an important biographer of Gandhi, Louis Fischer, used a version of the expression when he wrote about Gandhi’s approach to conflict. Fischer used the expression himself as part of his explanation of Gandhi’s philosophy. Some readers may have decided to directly attribute the saying to Gandhi based on a misreading of Fischer’s works.
There is a more authoritative biblical injunction in the Book of Exodus: "And if any mischief follow, then thou shalt give life for life, Eye for eye, tooth for tooth" (King James Version, Chapter 21, Verses 23, 24).
We are not sure from which entity, God or mammon, ex-pastor and General Secretary of the Singapore Kindness Movement (SKM) Dr William Wan derived his inspiration when he included following in a press statement (which was not published in the mainstream media):
"Tasteless videos and posts are no excuse for responding with vindictive attacks and threats of unspeakable violence. There is a difference between objecting, however strongly, to something that offends us, and meting out an eye for an eye, or worse."
SKM was pretty sure Dr Wan did send a letter expounding on said position to one of the local papers, before conveniently going away on leave. That's how serious discussions on religious topics can be in this town. Remember, local doctrine has it that the little boy's sin is criticising a religious figure, not the dead political one.