An affiliate of Wingate Companies, a multifamily real estate investing, consulting and property management firm based in the Boston suburb of Newton, completed the year-end purchase of the Baker Chocolate Factory apartments in Dorchester for $41 million, or $308,271 per unit.