Unfortunately, you are in need of both. But if it were mine and I had to upgrade only one of those components, I would go for the gfx card first. If you think you may be able to upgrade the CPU before too long, I'd get a GTX 1060 (in hopes of getting a FX-8350 in the near future)
If you see yourself stuck with the FX-6300 indefinitely, you are about at the top of the food chain in gfx cards now before bottleneck becomes noticeable. But even then, a GTX 1060 would help in games that aren't CPU limited.