An i5-8400 is the stronger performer in gaming, due to Intel's stronger IPC.
That being said, both are quality CPU's and, while the i5 would win out generally, the 1600 / 1600x is no slouch itself - especially overclocked.
FWIW, I'd disregard the 1600X. The 1600 can do the same clocks with a slight overclock, on the stock cooler (1600X doesn't include a cooler) - for a decent amount less money once you factor in a cooler. $190 vs $210+cooler (so minimum $230 or so).
The cost of entry to a platform favors Ryzen currently, as motherboards are cheaper and RAM is 'equal'.
BUT Ryzen does benefit from faster memory (3000-3200MHz) whereas Intel doesn't generally benefit much from speed (so 2400MHz is fine), saving a little on RAM.