The list is older than Gregory. Evagrius Ponticus, a fourth-century monk of the Egyptian desert, set out eight logismoi, tempting thoughts, as an analysis of what disturbs the mind in solitude, and his pupil John Cassian carried the eight into the Latin west in his Institutes, where they became a monastic diagnostic tool rather than a catalogue of sins. Gregory reduced them to seven by merging vainglory into pride and tristitia into acedia, and added envy. The point often lost is that this began as spiritual medicine for monks, not as a penal code.
The pairing of each sin with a named demon, which appears in the atlas alongside the vices, is a much later and quite separate development: it is chiefly the classification published by the German bishop Peter Binsfeld in 1589, in a treatise arguing for the prosecution of witches, and it should be dated to the era of the witch trials rather than to the patristic tradition.