Protein that confers, on plants, bacteria or other microorganisms, the ability to withstand herbicide action. Herbicides are chemicals that selectively kill plants. Herbicide resistance occurs usually as a result of mutation or amplification of a gene, e.g. 3-phosphoshikimate 1-carboxyvinyltransferase.