Plans to replace a historic gate at Ayr Cemetery after it was damaged by a vehicle have been given the green light.