I don't know much about dg-algebras, but I can at least tell you what an $E_\infty$-ring is. Hopefully somebody else will come along and fill in the gaps, as well as correct the mistakes I'm sure I'll make along the way. The first thing to know is that "$E_\infty$-ring" is actually short for "$E_\infty$-ring spectrum". I'll assume you know what a spectrum is, but of course just say so if you don't.

A ring spectrum is a (naive) spectrum $X$ with a unit map $S^0 \rightarrow X$ and a multiplication map $X \wedge X \rightarrow X$ such that in the homotopy category, $X$ has the structure of a ring-object. (Recall that all spectra are abelian-group-objects up to homotopy; that's sort of the point.) We could throw in the word "commutative", too. But either way, this doesn't suit all of our needs by a long shot; often we don't want to pass to the homotopy category, but neither is it reasonable to restrict to ring-objects in the original category either. So our compromise is that we still say that $X$ should only be a ring-object in the homotopy category, but we also want to remember the homotopies that make the axiom-diagrams commute, and moreover we want them all to be coherent in an appropriate way.

To figure out what this means, for the moment let's just start with $A_\infty$ ($A$ stands for "associative", whereas $E$ stands for "everything", i.e. associative and commutative), and let's just talk about spaces. We begin with a space $X$ equipped with a unit map $\eta:\mbox{pt} \rightarrow X$ and a multiplication map $\mu:X \times X \rightarrow X$ which satisfy the usual axioms. (The unit map always has the unit for the monoidal structure as its source.)

This is supposed to be homotopy-associative, which first and foremost implies that $\mu\circ (1 \times \mu) \simeq \mu \circ (\mu \times 1):X^{3} \rightarrow X$. This is witnessed by a homotopy $m_3:I \times X^3 \rightarrow X$; that is, we've got an interval parametrizing a whole family of triple-multiplications, such that on one end we've got $(ab)c$ and on the other end we've got $a(bc)$.

The next step, then, is to see what happens at 4-fold multiplications $X^4 \rightarrow X$. It turns out that there are five ways to parenthesize $abcd$, namely: $((ab)c)d$, $(ab)(cd)$, $a(b(cd))$, $a((bc)d)$, $(a(bc))d$. If you look at what I've done, you'll see that these sort of sit naturally at the vertices of a pentagon $P$, and each edge corresponds to one re-association, i.e. an application of $m_3$. For these all to be coherent, we demand that we can extend these maps $\partial P \times X^4 \rightarrow X$ to a map $m_4:P \times X^4 \rightarrow X$ interpolating between all possible ways of associating four factors.

From here, you can see what the general definition should be for "higher coherence of homotopy-associativity": there's a family of spaces $\{\mathcal{A}_n\}_{n\geq 0}$ and certain structure maps between them (which are messy and which I won't write down), and we're asking for a family of maps $m_n:\mathcal{A}_n \times X^n \rightarrow X$ -- or equivalently a single map $m:\coprod_{n\geq 0} \mathcal{A}_n \times X^n \rightarrow X$ -- which respect the structure maps (in a way that I also won't write down). This family $\{\mathcal{A}_n\}_{n\geq 0}$ and its structure maps are known as the $A_\infty$-operad, and a space $X$ along with such a family of maps is known as an algebra over this operad. So $\mathcal{A}_3=I$ and $\mathcal{A}_4=P$; these spaces $\mathcal{A}_n$ are known as (Stasheff) associahedra. They are all contractible; the point is that even if there isn't a single unique $n$-fold multiplication, the next best thing is that they're interpolated in a homotopically trivial way. (Level 0 is supposed to pick out the unit map, so we take $\mathcal{A}_0=\mbox{pt}$ and we need to agree that $X^0=\mbox{pt}$; level 1 is supposed to pick out the identity map, so $\mathcal{A}_1=\mbox{pt}$ too, and this requirement is wrapped up in the structure maps.)

This is all part of a much bigger story, of course. $\{\mathcal{A}_n\}_{n\geq 0}$ is an example of a non-symmetric operad; this is just a family of spaces with structure maps of the same signature. Non-symmetric operads form a model category. Its terminal object is the "associative operad", which parametrizes strictly-associative multiplication (so its spaces are all just $\mbox{pt}$), and any cofibrant replacement may be considered as "an" $A_\infty$-operad.

This leads us to $E_\infty$-spaces; the $E_\infty$-operad is a symmetric operad. The difference is that the $n^{th}$ space $\mathcal{E}_n$ comes with an action of the $n^{th}$ symmetric group $\Sigma_n$, and the $n^{th}$ structure map for an algebra $X$ over this operad now takes the form $\mathcal{E}_n \times_{\Sigma_n} X^n \rightarrow X$ (where $\Sigma_n$ acts by permutation on $X^n$). The $E_\infty$-operad has all its spaces contractible and all the symmetric actions free; in other words, $\mathcal{E}_n = E\Sigma_n$. The one I like to think about is $\mathcal{E}_2=E\Sigma_2 = S^\infty$, and the associated structure map $S^\infty \times_{\Sigma_2} X^2 \rightarrow X$. A path in $S^\infty$ from the north pole to the south pole (the space of which is contractible!) gives us a homotopy from some multiplication $\mu:X^2 \rightarrow X$ to $\mu\circ \tau:X^2 \rightarrow X$, where $\tau:X^2\rightarrow X^2$ is the twist map. In other words, for $\mu$ to satisfy the level-2 condition of describing an $E_\infty$-multiplication on $X$, not only must there be a homotopy from $\mu$ to $\mu\circ\tau$, but the space of such homotopies that we keep track of must be contractible.

The language of operads that I've described easily carries directly over to spectra: an $E_\infty$-ring spectrum is just a spectrum which is an algebra over the $E_\infty$-operad (either the same one, using the fact that you can smash spaces and spectra, or else a version internal to the category of spectra). $E_\infty$-ring spectra are important in homotopy theory for example because they give rise to power operations (e.g. the Steenrod squares, i.e. the natural transformations of functors $H^m(-;\mathbb{F}_2)\rightarrow H^n(-:\mathbb{F}_2)$), but there are external, algebraic reasons why they're interesting, too. Most notably, $E_\infty$-ring spectra are exactly those ring spectra whose categories of module-spectra admit a good notion of tensor product and internal hom and which are simplicially bitensored (meaning that there are good notions of tensoring a module with a simplicial set and the mapping-object of a simplicial set into a module, in a way compatible with the simplicial structure on the category of modules in the first place). This allows you to do homological algebra, as you suggest, as well as what is known as "derived" algebraic geometry.

Lastly, I'd like to point out that the examples of spaces and spectra are even more intimately related than you might think. The $E_n$-operad is also known as the "little $n$-disks operad"; its $n^{th}$ space is the space of ordered configurations of $n$ disjoint little $n$-disks (or, homotopy-equivalently, points) sitting inside the unit $n$-disk $D^n$. An $E_n$-algebra structure on a space $X$ is precisely the same as an $n$-fold delooping $X_n$ of $X$ (i.e. a homeomorphism $X \cong \Omega^n X_n$). The $E_\infty$-operad is the direct limit of the $E_n$-operads (indeed, a model for $E\Sigma_n$ is ordered configurations of $n$ points in $D^\infty$), and hence an $E_\infty$-algebra structure on $X$, assuming $X$ is "group-like" (i.e. $\pi_0X$ is a group instead of just a monoid) is precisely the same as a connective-$\Omega$-spectrum (i.e. an $\Omega$-spectrum indexed on the non-negative integers with $X$ as its $0^{th}$ space). In fact, assuming you've chosen a good $E_\infty$-operad, the categories of group-like $E_\infty$-spaces and connective spectra are Quillen equivalent. Under this correspondence, an honest ring $R$ (viewed as a discrete space) corresponds to the Eilenberg-MacLane spectrum $HR$, which represents the cohomology theory $H^*(-;R)$, and up to equivalence, these are precisely the $E_\infty$-ring spectra which have trivial homotopy groups away from dimension 0. Thus, the category of $E_\infty$-ring spectra is a vast enlargement of the category of ordinary rings. In particular, algebraic geometers get excited because $\mathbb{Z}$ is no longer initial -- the sphere spectrum is -- and hence "derived" algebraic geometry allows one to work over a deeper base. There's some philosophy along the lines of "the sphere spectrum is the K-theory spectrum of the field with one element", but this is way out of my depth so I'll stop here.

=============

EDIT: For what it's worth, since posting the answer above I have learned a little bit about the relationship between dg-algebras and their cousins. Here is what I can say.

Given an ordinary commutative ring $R$, there are (at least) three notions of "derived commutative $R$-algebra" that one might consider: simplicial $R$-algebras (which I'll denote by $\mathcal{SCR}_{R/}$), dg $R$-algebras (which I'll denote by $\mathcal{DGA}_{R/}$), and $E_\infty$-ring spectra that are $HR$-algebras (where $H$ is the "Eilenberg--MacLane spectrum" functor) (which I'll denote by $\mbox{Alg}_{E_\infty}(\mbox{Sp})_{HR/}$). In general, there are functors $$ \mathcal{SCR}_{R/} \xrightarrow{f} \mathcal{DGA}_{R/} \xrightarrow{g} \mbox{Alg}_{E_\infty}(\mbox{Sp})_{HR/} . $$

Now, when $R$ is a $\mathbb{Q}$-algebra, then $f$ induces an equivalence onto the "connective" objects (i.e. those that have no homology below degree 0) and $g$ is an equivalence. However, in general these are not equivalences, and not only for the immediate reason that the objects of $\mathcal{SCR}_{R/}$ are by construction connective while those of the latter two categories are not. Indeed, $\mathcal{SCR}_{R/}$ models the theory of commutative topological $R$-algebras (and weak homotopy equivalences) -- the word "simplicial" here is just a technical device to make things cleaner and more combinatorial. On the other hand, the subcategory $\mbox{Alg}_{E_\infty}(\mbox{Sp})_{HR/}^{\scriptsize \mbox{conn}} \subset \mbox{Alg}_{E_\infty}(\mbox{Sp})_{HR/}$ of connective $E_\infty$-$HR$-algebras can be thought of as modeling commutative-up-to-coherent-homotopy topological $R$-algebras (i.e., $E_\infty$, in the sense described earlier in this answer). In fact, there is an adjunction $$ \mathcal{SCR}_{R/} \rightleftarrows \mbox{Alg}_{E_\infty}(\mbox{Sp})_{HR/}^{\scriptsize \mbox{conn}} , $$ where the left adjoint forgets that the multiplication was strict and the right adjoint takes the "largest strictly-commutative subobject". Moreover, this adjunction is even comonadic: in other words, an object of $\mathcal{SCR}_{R/}$ is no more or less than an object of $\mbox{Alg}_{E_\infty}(\mbox{Sp})_{HR/}^{\scriptsize \mbox{conn}}$ whose natural inclusion from its "largest strictly-commutative subobject" is an equivalence.

On the other hand, we can also take a few steps back: the notions of dg-$R$-module and $HR$-module spectrum are equivalent (as are the notions of simplicial $R$-module and connective $HR$-module spectrum), and in fact dg-$R$-modules with a strictly associative multiplication do indeed model $A_\infty$-$HR$-algebra spectra. It's only when we pass to the commutative setting that we can no longer model the "up to coherent homotopy" version with the "on the nose" version. Of course, one can still model $E_\infty$-$HR$-algebra spectra via (the appropriate notion of) $E_\infty$-dg-$R$-algebras...

For a bit more (including the comonadicity statement and a nice explanation via the two notions of "the affine line" in $E_\infty$-ring spectra), I would recommend reading section 2.6 of Lurie's thesis (available as a link towards the bottom), pp. 45-50.