The star will appear in the 21st episode of the show, executive producer Eileen Heisler told reporters at the Television Critics Association press tour.
Goldberg will play a guidance counsellor working with Sue (Eden Shur), TV Guide reports.
Heisler also revealed that Ed Asner will guest in The Middle shortly, though she did not reveal details of his role.
Stars who have previously had guest roles in The Middle include Betty White and Chord Overstreet.
The comedy airs on Wednesdays at 8/7c on ABC.