It comes from the Theories of Surplus Value in the discussion of Adam Smith, the subsection The Distinction between Productive and Unproductive Labour, and within that subsection, the subsection 17 on Nassau Senior. Unfortunately this link lands you far from the passage in question.
Man himself is the basis of his material production, as of every other production that he carries on. All circumstances, therefore, which affect man, the subject of production, modify plus ou moins all his functions and activities, and therefore his functions and activities as the creator of material wealth, of commodities too. In this respect it can in fact be demonstrated that all human relations and functions, however and in whatever they may present themselves, influence material production and engage with it determinatively to a greater or lesser degree.
For such a short passage, I have revised the translation at MIA pretty seriously. Specially in the last clause. What I have translated as "engage" appears there as "have decisive influence on." The German eingreifen generally means "intervention," like a military intervention or what authorities do in general. A very literal translation would be "in-grip," stick your hand in and grab hold. So it denotes and connotes a very active and forceful imposition from the outside.
Marx says, the relationships of production, in other words class positions, are actively and forcefully shaped by all the circumstances, like race and gender, that affect humans.
Pace universalism/class reductionism.