The German pharmaceutical and chemical conglomerate aims to add Monsanto’s world-leading position in seeds and crop genes to its stable

Monsanto Co. agreed to sell itself to Bayer AG after months of haggling, in a $57 billion deal that would create an agricultural powerhouse and end the independence of one of the most successful and controversial companies in the U.S.

If regulators approve the deal, which was unveiled Wednesday, the German pharmaceutical and chemical conglomerate would inherit Monsanto’s market-leading position in seeds and crop genes. That would...