Yes, this is closely related to the theory of operads. Here is a very informal discussion of the case of monoidal categories. In particular I will intentionally blur the distinction between spaces and groupoids.
A (non-symmetric) operad O is a gadget consisting of a bunch of spaces On which we think of parameterizing n-ary operations, together with structure that tells us how to compose operations. An algebra X over an operad O consists of a bunch of maps On x Xn -> X which are compatible with this composition structure. For example, the associative operad A has An = * for every n, so there's just one n-ary operation X^n -> X for each n, and this makes X into a monoid.
We would like to say that a monoidal category is a monoid object in categories, but this is too strict for most purposes. The problem in model category language is that the associative operad is not "cofibrant". What we need to do is find a "cofibrant replacement"--an operad B such that all the spaces Bn are still contractible, but in which those composition structure maps which I glossed over are better behaved. An example is the operad B formed from the associahedra. B2 is still a point, but B3 is an interval, and B4 is a pentagon. Now a B-algebra in categories consists of a category C together with a functor B2 x C x C = C x C -> C, a functor B3 x C x C x C -> C, a functor B4 x C4 -> C, etc. These functors are the monoidal product, the associator, and the pentagon identity respectively. There's nothing higher because the next bit of structure would be an "identity between identities", and we don't have any such thing in a category. But if we were defining a monoidal 2-category the pentagon identities be replaced by 2-morphisms called "pentagonators" and there would be a coherence condition coming from B5.
Edit: I should emphasize that we did not obtain the operad B from A in any canonical way--B was "pulled out of a hat". But the model category machinery ensures that if we had chosen a different cofibrant replacement B', then the notions of B-algebra and B'-algebra would be equivalent. This notion is thus associated to A in a canonical way; the familiar description is not canonical.