The main difference is that Dirac Lagrangian doesn't involve photon-electron interaction which makes the local $U(1)$ symmetry possible, while the main purpose of QED is to describe the interactions of electrons and photons.
First of all, the Dirac Lagrangian reads as follows:
$$
\tag{1}
\mathcal{L}=i \bar\psi \gamma^\mu \partial_\mu \psi - m \bar\psi \psi
$$
where global $U(1)$ symmetry is obvious. An element, $g=e^{i q \theta}$ of the symmetry group, where $\theta$ is a constant parameter, leaves the Lagrangian invariant under
$$
\tag{Global U(1)}
g=e^{i q \theta} \\
\psi(x) \rightarrow g \psi(x) \;\; \text{and} \;\; \bar\psi(x) \rightarrow \bar\psi (x) \, g^*
$$
since it can pass the partial derivative and cancel its conjugate.
However, a local $U(1)$ transformation would not make it invariant because the element $g$ is now spacetime dependent, i.e.,
$$ \tag{Local U(1)}
g(x) = e^{i q \theta(x)} \\
\psi(x) \rightarrow g(x) \, \psi(x) \;\; \text{and} \;\;
\bar\psi(x) \rightarrow \bar\psi(x) \, g^* (x)
$$
so you would have an extra term like:
$$
\tag{2}
\delta \mathcal{L} = - q \bar\psi \gamma^ \mu \partial_\mu \theta(x) \psi
$$
Therefore, Dirac Lagrangian is not invariant under local $U(1)$ transformations. This is the starting point of the QED: how one can describe a local $U(1)$ symmetry out of the Dirac Lagrangian?
After the development of QED, the Lagrangian becomes essentially a Dirac Lagrangian plus a term consisting a photon-electron interaction, as follows:
$$
\tag{3}
\mathcal{L}_{QED}=i \bar\psi \gamma^\mu \partial_\mu \psi - q \bar\psi \gamma^\mu A_\mu \psi - m \bar\psi \psi - \frac14 F_{\mu \nu} F^{\mu\nu}
$$
where $A_\mu (x)$ is the photon field, $F_{\mu\nu}$ is the field strength tensor of photon, and the second term is sometimes embedded in the derivative, such that, $$
\tag{4}
\nabla_\mu \equiv \partial_\mu + iq A_\mu
$$
becomes the new derivative, which is called the covariant derivative.
As you can see, the local $U(1)$ transformation of the second term gives the exact same extra term above, but with an opposite sign, so that they cancel each other. Because the photon field transforms as
$$
\tag{5}
\delta A_\mu (x) = \partial_\mu \theta(x)
$$
That's why this local $U(1)$ symmetry is called a gauge symmetry, and the photon is called a gauge boson.