According to Hans Samelson's historical note "Differential Forms, the Early Days", both notions were introduced in Les Méthodes nouvelles de la Mécanique Céleste by Poincaré (vol. 3, Gauthier-Villars, Paris, 1899, pp. 9-15). Samelson notes
Given a p-form $\omega$ whose integral over any closed manifold is 0, then there is a (p - 1)-form, let's say $\psi$, that stands to $\omega$ in the relation described by Stokes's theorem (so that $\omega=d\psi$; he calls such an $\omega$ exact). Thus we have here the non-trivial half of what today one calls the Poincare Lemma: $\omega$ is $d\psi$ for some $\psi$ ($\omega$ is "exact") if and only if $d\omega = 0$ ($\omega$ is "closed").
Apparently, it had taken some time for the terminology to stabilize as, for instance, Goursat used the term "exacte" in his book for a form that today one calls closed (E. Goursat, Leçons sur le problème de PfaffLeçons sur le problème de Pfaff, Hermann, Paris, 1922).