Re-establish good relations with people one has disagreed with.
The proverb 'Good fences make good neighbours' is listed by Oxford Dictionary of Quotations as a mid 17th century proverb. Robert Frost gave the proverb a boost in the American consciousness with his 1914 poem Mending Walls:
He will not go behind his father's saying,
And he likes having thought of it so well
He says again, 'Good fences make good neighbors.'
That poem, and the 1870s coining of the term 'mending fences' both appear to be influenced the earlier proverb.
In 1879, the American Senator John Sherman returned to his home in Mansfield, Ohio and made a speech, in which he said:
"I have come home to look after my fences."
Sherman probably had in mind returning to look after the fences on his farm. Whether he meant it that way or not, the line was interpreted to mean that he had come with a political motive and intended to acquire support in the coming elections.
Within a few years, 'mending fences' had come to mean 'looking after your interests', particularly one's political interests; for example, this piece from The Mitchell Daily Republican, October 1890, headed 'Coming To Mend Fences':
"An announcement that Consul General John C. New is en route to this country ... has created quite a stir among Republican politicians, and there is a belief that he is coming to assume the personal direction of the campaign."
The phrase mutated to refer to the rebuilding of previously good relationships during the 20th century.