In my experience, a full PC-wealth NPC has a challenge rating of his class level, if reasonably optimized and statted similar to the PC's. A normal NPC has a challenge rating of around 1 below that except at low levels (in other words the standard guidelines overstate the challenge at medium to high levels). At high levels an NPC with only NPC level wealth might be even CR 2 weaker, but that's extreme, and I'm not very experienced with levels beyond 13. Gestalt adds about 1 CR.
Note, however, that you'll throw wealth by level out of whack enormously if you actually let your PC's gain all that wealth - unless you're playing at very low levels, where PC and NPC wealth are similar. Even a normal NPC grants far more treasure than warranted for his CR, so you shouldn't use them too often. PC-level wealth...
For example; an EL 10 encounter on average should result in 5800 gp. An 11th level NPC has 21000gp (Which I find to be a CR 10 encounter). A 10th level PC has 49000 gp (also CR 10). As the level rises, these numbers diverge even more.