Most of the people here will all lean towards PCs. I will give you my opinion on the matter that will cover aspects that need to have some light shed on them.
Software compatibility will not be an issue with the Mac because of boot camp. OS X comes with a free utility to help you install Windows on your Mac so you can dual boot and provides you with all of the Windows 7 drivers for your hardware, this is called Boot Camp. This means that you can play any game that is out on the market, whether it be for OS X or Windows. However, you will need to buy a copy of Windows much like you would need to buy a copy if you were to build your own system. Also, if you want to upgrade from Windows 7 to Windows 8, it will cost at least $100, maybe even up to $200. However, upgrading from Leopard to Snow Leopard was only $30, as was Snow Leopard to Lion. So if you plan on upgrading your OS in the future, take that into account.
If you are going to be doing a lot of 3D work, you should consider a Quadro card. A $200 Quadro GPU will outperform nearly any consumer grade GPU. This is because Quadro cards are professional GPUs that are optimized for professional applications whereas consumer grade cards are not really optimized for anything and instead just focus on raw power for video games. In this sense, Windows will be the way to go because NVIDIA and AMD both make professional cards for the platform.
From my years of experience working with Adobe products on both platforms, they run much better on OS X, even with the same hardware. Photoshop will run so much smoother on my 12-core Mac Pro under OS X than under Windows 7.
Pyree is right in that the iMac has a mobility version GPU. In this sense, you will get a higher spec'd system for the same amount of money if you build your own. But this is essentially the same with buying any pre-build Windows based machine.
The iMac comes with a quality IPS panel display that provides superior color accuracy and viewing angles over other monitors, such as TN panel monitors. If you were to get the 27" model, that is a 27" LED backlight IPS panel display, although it is glossy which some people do not like. These types of monitors are not cheap. A similar monitor can easily cost $800-$1000. For example, the Dell u2711 is a 27" monitor with an IPS panel and is $980. Try and include that into a 2K build budget and it will be difficult.
http://www.newegg.com/Product/Product.aspx?Item=N82E16824260038
Another thing to take into account is resale value. If you were to go on craigslist and look at people selling their used macs, it will be easy to find them. I suggest you look at what 2 and 3 year old iMacs are selling for on craigslist at the moment, that can give you a good estimate of what yours will be with in that amount of time. However, if you build your own computer, it is nearly impossible to sell it. However, the good thing about building your own is you can reuse parts like the case.
The iMac will have more flexibility in terms of software. The reason is because you can run any operating system on it without any problems, such as Ubuntu, Windows 7, and OS X. If you were to build your own system, you would have to carefully select each part to make a system that will run OS X. In which case you will then have to go through the process of turning it into a hackintosh. And whenever you use OS X, it will not be as stable as if it were a real Mac.
The iMac will also include Thunderbolt (10 Gbps), which is twice as fast as USB 3.0 (5 Gbps). So if you are worried about not being able to fit enough hard drives inside the iMac, Thunderbolt is your answer. You can easily get an external enclosure for hard drives and daisy chain them with Thunderbolt without any loss of performance.
With your own custom build, you will need to continually look for updates for all of your components, such as the GPU, motherboard, etc. However, with the iMac you will not have to because all of that is in your software update so you will not have to worry about updating your BIOS or anything like that.
Another benefit of the iMac is a full warranty. Although you will have individual warranties for every component of a custom build, with an iMac you can always take it to an Apple store if anything goes wrong. And you can always extend your warranty to 3 years so you are guaranteed a perfectly working system for 3 years, provided you do not accidentally drop it of course.
If you are looking to do a lot of 3D work, I would suggest building your own system for the sole reason of being able to get a professional graphics card. Personally, my next desktop will be a custom build strictly for being able to use a Quadro 5000. Also, if you want to get into water cooling and overclocking, a custom build will be best for you. Also, if you strictly want to spend less money for a good system, a custom build will be for you. Another thing to mention is the satisfaction of building your own computer.
If you will not be doing anything too crazy 3D-wise and want a more stable system backed with a solid warranty, more flexible software-wise, resale value, and comes with a professional quality display, then I would suggest the iMac.
With a budget of $2,000, you can build a very powerful desktop, no doubt. But there is more to it than just numbers on a piece of paper, or in this case on a screen.
In a way, it is hard to compare an all-in-one computer to a custom built tower, whether it be an iMac or any Windows based all-in-one. They are not in the same categories, but either one would do well for you.