B&G, which will enter the frozen food business with the deal, expects the acquisition to immediately add to earnings, it said in a statement on Thursday.
Green Giant, whose mascot is the Jolly Green Giant, makes more than 160 products. It has been struggling to boost sales as consumer increasingly prefer more plain vegetables rather than sauced varieties.
General Mills said in July that it recorded a $260 million charge in the fourth quarter to write down the value of Green Giant after an assessment showed the business's market value was lower than its carrying value.
Reuters reported last week that General Mills, the maker of Cheerios cereal and Betty Crocker cake mixes, was in late-stage discussions with B&G to sell Green Giant.
B&G sells shelf-stable snack foods in the United States, Canada and Puerto Rico under brands such as Vermont Maid, Pirate Brands, maker of Pirate's Booty Popcorn, and Cream of Wheat.
The company said it expects the Green Giant and Le Sueur brands to generate annual sales of about $550 million and add 60 cents per share to profit.
The two brands generated net sales of about $585 million in fiscal 2015, General Mills said in a statement.
The company said it expects the sale to lower fiscal 2016 profit by about 5-7 cents per share.
General Mills said it would continue to operate the Green Giant business in Europe and select other export markets under license from B&G Foods.
Parsippany, New Jersey B&G expects the deal to close during the fourth quarter.
B&G shares rose 3.5 percent to $31.50 in premarket trading.
Barclays and RBC Capital Markets are B&G's financial advisers, while Rothschild advised General Mills.