I think this answer is a bit more complex than simply answering "body vs lens".
If you are talking about a Canon 70D with a 50mm f/1.8 vs. a Canon T3i with a 50mm f/1.2L , then the answer will be LENS.
But, if you are talking about a Canon T3i with a 50mm f/1.2L vs a Canon 6D with a 85mm f/1.8, then the answer will be BODY.
While the LENS has a huge impact, so does the BODY. But, the biggest impact the body has is FULL FRAME vs CROP. So, you are probably better upgrading the LENS instead of upgrading to another crop body. But if you are moving to FULL FRAME, you may get superior image quality by upgrading the BODY instead of the lens.
I agree with this. In my experience. I used to own a 7D. Going to L lenses from mid-range, slower lenses, offered me little to no difference in image quality. Upgrading at that point to FF though, made a huge difference. My conclusion was that the mid-range glass, like the 28-135, was well matched to the 7D, and thus, the 7D could not resolve much better image quality from the nicer glass. FF could though, I saw an immediate difference when I moved to FF, both from my L zooms and my mid range primes. The FF even made my 50mm 1.8 seem like a new lens.
The answer is not "body" nor is it "lens" the answer is to find the weak point in your equipment and upgrade that.