For playing AAA games like Battlefield One, GTA V, etc. at this resolution, you'd need at least a GTX 1080, and a 1080 Ti wouldn't be overkill either. An RX 580 will not play most games at high details on that resolution - you'll either have to bear with low FPS or lower the details down. For $400, you can't get anything over a GTX 1070, that too at normal prices. Right now, the prices of both the GTX 1070 and the RX 580 are highly inflated, and I would recommend you to wait for their prices to come down, or increase your budget to get a GTX 1080. A GTX 1070 might pull off the resolution of your monitor at medium-high details, though it won't be the ideal choice still. That is a high-end monitor, and you need a high-end GPU to run it. The RX 580 would be underpowered for it, especially for AAA games.
If you only play non-AAA games like CSGO, Overwatch, LoL, etc, then an RX 580 8 GB should be enough for the job, or a GTX 1070 if you can push it.