Public schools in higher ranked socio-economic areas do very well, even with unions present, so I don't think unions are the major issue.
The statement is worded so loosely that I can't really falsify it. However, the issue is not whether a union is present but whether the union's presence is a binding constraint on improvements to the educational system. In higher socio-economic areas, there are far fewer underlying challenges to the educational system and thus fewer opportunities for the union's pursuit of its own interests to interfere with addressing those challenges. The appropriate counterfactual to consider is whether the public schools--whether in higher or lower ranked socio-economic areas--would do even better in the absence of unions. The answer can certainly be "yes" if the unions were using their monopoly power to constrain the behavior of other stakeholders in the system.
But the monopoly that's relevant is not primarily the teacher's union, it is the monopoly of the school board over the educational choices of the families in the area (which itself may facilitate the unionization of the labor force). Of the several elements that characterize the public schools in my town:
I do not object to the generally progressive manner in which educational funds are raised within the district. We have a local property tax. In this community, the value of the house is a pretty close analogue of permanent income. (I don't necessarily advocate property tax funding more generally given the disparities across districts, but that's a different matter.)
I do not object to the use of some of those monies to run our highly regarded public schools that my children could attend without additional payments from K-12.
However, I strongly object to the constraint that all of these monies go into just these three schools (covering K-5, 6-8, 9-12). I have no choice of provider if my views of the best educational program for my children are at odds with those of the school board, acting on behalf (hopefully) of the other members of my community. I don't begrudge them their views, but I simply may not share them. I don't see why I should have to forfeit all of the tax monies that would be spent on my children's behalf to put them in private schools.
The money that is allocated to my children's education--not the tax money I pay--should follow the children rather than being constrained to be spent only at the government-run schools. That's the key monopoly problem, whether in high-ranked socio-economic areas like mine where additional expenditures are a desirable luxury good or in more disadvantaged areas where the consigning of low-income students to poorly performing schools is catastrophic. If the money followed the children, then multiple providers would compete, and members of the community could be better served by that diversity.
I may post more on implementation of such a system at a later date.