If you have the Mini Tower then the Zotac GTX1050Ti 4GB Mini will drop right in and run with no PSU swap needed. The 2GB version is good also and cheaper.
The good CPUs for that are the Q9650, and the Q9550. At least 8GB DDR3 1066 low density RAM.
If you have the DT or SFF say so and I'll go into those for you.
Here are examples of that system.
https://www.userbenchmark.com/System/Dell-OptiPlex-780/3883
The Q6600 in 2nd place is an old school tapemod overclock to 3GHz.
The GTX 1050 can move forward to another system later. So it's not a bad place to put the money.