Gaidax :
Bunch of murky answers above. I'll set it straight.
Intel is outright better at gaming starting from 170 bucks for CPU. That's what I5-8400 costs which by itself beats every Ryzen there is at gaming.
Reason is simple, games favor faster cores more than more cores and that's where Intel is strong.
There is always this beating around the bush going on "but Ryzen is better at various odd jobs, streaming and blah blah", but the reality is that unless you are some e-personality pumping videos daily, it's pointless advantage, while Intel is plain better at games which is what you will do for sure.
That simple generalisation may have been true with first gen Ryzen, but it's just not accurate anymore. The overclocked Intel CPUs are still untouchable, but a properly configured second gen Ryzen beats locked Intel CPUs even in gaming.
The 2600x review here on Toms found it slightly faster overall in gaming than the i5 8400 - even with the 2600x at stock. If you want a comprehensive overview, check out Techspot's 8400 vs 2600 (non x) article (or the corresponding video on Hardware Unboxed). Steve is a benchmarking machine and ran a 36 game comparison at 3 resolutions with a 1080ti. The Intel CPU wins by a narrow margin at stock with slower memory, but once you OC the Ryzen CPU with faster RAM it's measurably (though not massively) faster. Review conclusion is
HERE
You could certainly make a case that the Intel i5 8400 with cheaper RAM is better value for gaming and it's certainly simpler to get the best out of it, any old B360 board and DDR4 kit is all you need. Having said that, your statement about the i5 8400 beating every Ryzen CPU in gaming is simply not correct... not anymore. It's true of an OC'd 8600K or 8700K, but not the locked CPUs.
OP - these debates go back and forth all the time, in the end there's really not that much in it. Either are good picks and you'd be hard pressed to pick the difference in a side-by-side comparison let alone find one disappointing. Here's my opinion FWIW:
1) the 2700X is a great CPU, but overkill for gaming. The 2600X gives you the same gaming performance and frees up budget for more important things like your GPU or faster RAM (matters for Ryzen, much less for Intel).
2) I'd steer clear of the i7 8700 (non-K). If you just want to game then the much cheaper i5 8400 offers very similar performance and if you care about the extra threads there much better options. On top of that the bundled cooler is terrible.
3) One key advantage with AMD is the promise of future CPU compatibility. AMD have a very aggressive roadmap and I expect to see genuine progress over the next few years. You can expect to drop future 2019 or 2020 processors into any decent motherboard you buy today.
So, recommendation:
If you're getting a premium gaming PC (including GTX 1080ti and 144hz display or faster) and you just want the highest FPS you can, you should look at the 8600K or 8700K. On a Z series board with a good cooler and overclock, they're the best gaming CPUs money can buy.
If - however - your budget is tighter OR you want to set yourself up a good base-system to build on in the future OR you care about productivity workloads, the Ryzen 5 2600X or 2600 non x are worth a look. With a decent set of RAM they'll match or beat the locked Intel CPUs in gaming and offer better productivity and future upgrade options.
A third option is a balanced i5 8400 build. With careful component choices this comes in slightly cheaper than a Ryzen system that games similarly (because you can use cheaper RAM and you don't need to OC). It offers better gaming FPS for your dollar at the cost of future upgrade-ability and productivity performance.
Any of the above 3 are good choices depending on your budget and personal priorities.