This is the Ross-Littlewood paradox. The resolution I favor is the third one in the Wikipedia article; if I take the deal an infinite number of times, the amount of money I have remaining depends on the details of exactly which $5$ dollars you choose to steal from me at each step. This is surprising because if I only take the deal finitely many times it doesn't matter. Depending on exactly which dollars you choose to steal from me, I can end up with any finite amount of money left (including zero) or an infinite amount of money left.
Edit: Among other things, this means calculating the ratio of money gained to money lost is not a good way to understand what actually happens after taking the deal an infinite number of times.
Here's an example. Let's say all the dollar bills involved have serial numbers, starting $1, 2, 3, \dots$, and
- whenever the you give me dollar bills you give me the ones with the smallest serial numbers you haven't given me yet, and also
- whenever you take dollar bills, you take from me the ones with the smallest serial numbers.
Then it's not hard to see that you eventually steal every dollar bill from me, which means at the end I end up with no money. This is despite the fact that at every finite step I end up with more and more money!
On the other hand, suppose I changed the second bullet point to "whenever you take dollar bills, you take from me the ones with the largest serial numbers." Then it's not hard to see that I end up with infinitely many dollars. I'll leave it as an exercise to figure out how to modify this so that I end up with any particular finite amount of dollars.
(This is not just a mathematical curiosity either; it can be turned into an example where a limit of integrals is not an integral of (pointwise) limits, which explains why the hypotheses of the dominated convergence theorem are necessary.)