Unfortunately, the painful reality, especially if you've been hit by Panda, is that you probably can't support that scale or that it looks thin to Google. 500 cities X 50 categories = 25,000 "category" pages, so to speak, all of which are basically just search results. For most sites, it's just too much.
I'd definitely keep the cities as sub-folders. If you go the sub-domain route, you could fracture your internal link-juice even more. It depends a bit on the authority and marketing budget of the site. If each city is a separate property with its own sales force, budget, etc., there may be a logic to sub-domains. Unless you're Groupon or someone like that, though, it's probably a bad idea.
You may have to prune down the indexed content, to be frank. I'd look for other Panda factors, too, like aggressive ad density (too many ads to too little content) or very thin pages. If you have tons of cities or categories with no listings, META NOINDEX them. You could even do it dynamically - only let Google index a page if it has 1+ listings, for example.
I'd also take a look at other low-value content, like paginated search. If each city has 100s of pages and you're indexing page 2, page 3, etc., consider consolidating them. It's a tricky topic, but Adam Audette has a great write-up here:
http://searchengineland.com/five-step-strategy-for-solving-seo-pagination-problems-95494
These pages can look very low-value to Google. Add in search sorts and other variants, and your 25K categories could be exploding into hundreds of thousands of pages, before Google even gets to the listings themselves. The ads are the real meat of the site, and that's where you want Google to focus.