As I said in this answer to another question, city operation basically depends on (a) stability, (b) food imports, (c) utility infrastructure, and (d) law and order. But, before we go into stuff like that, let's get a trivial condition out of the way.
Trivial Answer: You can have a functioning society of two people. But, such small societies are very, very different in their nature than a society of even 1,000 (much less the 500,000 you state in your question). Small societies operate on individual independence1. Large societies operate on group interdependence2. I'm going to assume you mean the greatest loss of population that allows a large group-interdependent society to remain a group-interdependent society and not shift to individual independence.
1 individual independence is, for example, the ability and need to hunt/garden for your own food, which you can do because there aren't so many people that the food source will become depleted.
2 group interdependence is, for example, the need to depend on others to provide food for the whole because if everybody went out hunting the deer would be depleted so quickly that starvation would set in. A more efficient food supply is required: bulk farming and ranching. Population density is a harsh taskmaster that we will encounter again momentarily.
Food: As we're limited to just a single city, we can assume (b) isn't a problem as unaffected areas can send the afflicted city enough food to survive and prosper. The only caveat to this is that you need enough people in your city to receive and distribute the food. A quick Internet search did not afford specific insight into what percentage of a city's population was devoted to food distribution (everything from truck drivers and regional distribution centers to that excellent taco trailer in your company's parking lot). However, based on my personal experience, I doubt any city devotes more than perhaps 5% of its population to food distribution. And that might be generous. Further, the smaller the population the easier the distribution (struggling people will come to you, after all). Therefore, food isn't a limiting issue.
Children & the Aged: Before we go further, let me point out that children and the aged are (ruthlessly) the easiest demographics to reduce without affecting the city. For example, the U.S. Census estimates that in 2016 about 23% of the population are age 18 and below and 15% are age 65 and above. Not to demean anyone, but the odds are so much in my favor that an 18-year-old and a 65-year-old don't hold society-critical jobs that the entire 38% can be removed without having any affect on the city's stability. Quite the opposite. By freeing trained adults from education, child care, geriatric care, and other services supporting children and the aged, by reducing the food and utility needs required by children and the aged, etc., etc., etc., you're actually increasing the stability of the city. (And I just grew horns and a bifurcated tail for pointing it out.)
City Infrastructure: This is the second biggest problem, but it's also very flexible. The problem is the random chance involved that one of the few highly-trained individuals who run water, sewer, gas, petroleum, electricity, police, fire, medical, etc., services are removed. They are not easily replaced. Remove enough of them and the city loses those critical infrastructures and quickly collapses. This group of people may only represent 10% of your adult workforce, but that 10% can't be reduced by much (say, from 10% to 8%) and your city is teetering on the edge of the abyss. Utilities are among the most sensitive.
Law and Order: This is the big one. It would seem you could reduce a city's population almost forever, but the 1977 New York blackout proved that basically good people become basically bad people in droves when law & order loses control. As I said in my previous answer: The average number of cops to citizens is about one for every 250 people. It doesn't take much panic at all before the police are completely overwhelmed. As the population depletes, the number of abandoned houses and buildings increases, accompanied by crime and the chaos it brings. Reduce the population to far and a criminal can run almost anywhere and hide. Since the people supporting surveilance cameras, etc., are also depleting (as are the people fixing and installing them, because they're getting shanked in the growing lawless areas where there isn't sufficient police protection) the situation spirals quickly.
You'll notice I didn't include the politicians in any of that discussion. Yes, they serve a purpose, but when the chips are down, politicians only control the flow of regulation, which can be and would be compressed mightily to accommodate population decrease. In other words, while not entirely inert like children and the aged... they're pretty darn close....
Population Density: Here's where population density is so important. One of the many reasons why the ratio of police-to-residents is so low is that high population density is easy to police. Yes, a high population density is one meal away from panic and chaos, but that noose around all our necks is also what allows the police to keep so much control. We're dependent on each other, and so very little actual policing is required to keep order. If the density drops (lots of abandoned buildings between the police station and John and Jane Doe's house), then the ability to effectively police drops considerably. Your population would of necessity need to move closer-and-closer to the center of law and order to retain a functioning group-interdependent society... with the outer ring of buildings becoming more-and-more lawless. (You'd better hope Grandma is willing to leave her home.)
Finally, there's the issue of how quickly people are disappearing: This last issue is important. Even in a city of 500,000, if you lost 1,000 people in a day, the panic would be instantaneous. Lose 50,000 people over five years and the bank's ruthless lending practices are blamed — but the city adapts, reorganizes, and continues. Let's assume, then that the depletion is slow enough the city can rationalize it and reorganize to compensate — but cannot import new talent to replace critical functions.
Conclusion: With 38% of the city's population being "inert" and assuming 100% random depletion (no geographic or demographic focus of any kind, a very unselective virus...), that means your city is roughly 38% inert population, 10% critical population, and 52% compressible population. My assumption is that you begin to lose stability when that 10% critical population drops to 8%. That's a 20% loss of population overall.
But it's the bottom number that's interesting. That number represents rise in the crime curve associated with abandoned buildings and general panic. I'm pulling this number out of my left ear with by right big toe... it's that well supported by
non-existent facts. But my gut tells me at 40% you have so many abandoned properties that too many "good people" become opportunistic thieves.
Therefore: 20%-40% reduction, after that the city collapses like Godzilla was on the horizon.