$\infty = -1 $ paradox
When we talk about an "infinite sum", we are really talking about a limit. In this case, we are talking about the limit of the "partial sums" of the series. The partial sums are: $$\begin{align*} s_1 &= 1;\\ s_2 &= 1+2;\\ s_3 &= 1+2+4;\\ &\vdots \end{align*}$$ That is, $s_n$ is the sum of the first $n$ summands in the series. When we talk about the "value" of a series (an infinite sum), we are really talking about the limit of the $s_n$: that is, a specific real number $L$ that the $s_n$ are approaching as $n\to\infty$. Or we say that a series "equals $\infty$" if the values of $s_n$ grow without limit.
When you say $x = 1+2+4+\cdots$, what you are really saying is that the limit of $s_n$. In this case, the limit of the $s_n$ does not exist, because $$\lim_{n\to\infty}s_n = \infty.$$ The values of $s_n$ get arbitrarily large as $n\to\infty$.
It is certanly true as well that the sum $2+4+8+\cdots$ is also $\infty$, since $2\times\infty = \infty$ (in the extended reals). And if you subtract one, then you still get $\infty$ because $\infty -1 = \infty$ (in the extended reals).
So you can write $2x = x-1$.
What you cannot do, however, is "subtract $x$ from both sides"; because that would be writing $$2\times\infty - \infty = \infty -1 -\infty$$ and the problem is that even in the extended reals, $\infty-\infty$ is undetermined. It does not equal anything, and certainly not zero. In short, you cannot just cancel infinities.
Two comments. First, it is possible to get this sum to make sense if one changes the notion of limit. The $2$-adic numbers are equipped with a different absolute value than the usual absolute value on rational numbers, and using this absolute value the series actually does converge to $-1$.
Second, the series $1 + z + z^2 + ...$ defines what's called a holomorphic function on the complex numbers with absolute value less than $1$. On these numbers it can be identified with its sum $\frac{1}{1 - z}$, but the latter expression now makes sense for all values of $z$ not equal to $1$. This is a special case of what's known as analytic continuation of a holomorphic function.
More generally, the limit definition Arturo describes is not the only way to give meaning to an infinite sum. It is the standard way, and for almost all intents and purposes it is the most useful way, but it is not the only way. Alternate methods are covered at the Wikipedia article on divergent series, and lest you think this is just a curiosity, summing divergent series happens to be relevant to certain physical theories which give sums that would diverge if they weren't summed in a non-traditional way.
If you're not familiar with $2$-adic numbers, here's a very brief introduction and a very short "proof" of the above identity using them. Basically, they behave like the natural numbers (with zero), except that they have infinite binary expansions going to the left. The number $1 + 2 + 4 + 8 + ...$ has binary expansion
$$...1111_2$$
in the $2$-adic numbers, and then the proof that it is equal to $-1$ is just a matter of carrying infinitely many times (add $1$ to the above)!
I happen to be sitting next to a group of math majors, and I decided to explain this 'cool new proof' of a 'previously unknown result' to them. Here's how that went:
$$" x = 1 + 2 + 4 + 8 + 16 + ... "$$ They are already suspicious - it is peculiar giving $\infty$ a name like $x$, and so I can tell they already know that something strange is afoot.
"Note that $2x = 2 + 4 + 8 + ... = x - 1$."
They don't seem to hate this idea yet. One asks me if we are interpreting a sequence of partial sums - a very natural question, as it's sort of the only way to make any sense of it. But then I say
"Note therefore that $x - 1 = 2x \rightarrow x = -1$.
Now they all stopped me - it's utter nonsense, they say. As much as I might like to try to recover the situation and pull the hood over their eyes, they have seen through it. Unfortunately, so have I. It simply doesn't make sense to subtract 'infinity' from 'infinity.'