Some students get extra support because they have disabilities or need extra language instruction. This is not about poor performance, per se, but rather about giving extra support to specific groups of students who obviously need it. This usually relates to state/federal law.
But your run-of-the-mill poorly performing student is given woefully inadequate support by understaffed and underfunded schools, just like everyone else. The way to fix this problem is by improving teacher pay, giving teachers more time during the schoolday but outside the classroom for self improvement and collaboration, properly supplying schools and fixing their facilities, and giving teachers more local autonomy and less bullshit standardized tests.
The best performing students tend to get tracked into special classes (“honors”, “AP”, etc.), have more direct relationships with teachers, are members of school-organized extracurricular activities, and so on. They speak up more often in class, interact with other academically motivated students. Perhaps most importantly, they generally have more considerably more external support (family help from better educated parents with more free time, private tutoring, out-of-school music/art/sport/etc. training, and so on).
Did this have an negative impact on gifted program funding? Some educators definitely believe it did.
"In particular, NCLB does not require any programs for gifted, talented, and other high-performing students. Federal funding of gifted education decreased by a third over the law's first five years ... In other states, such as Michigan, state funding for gifted and talented programs was cut by up to 90% in the year after the Act became law."
Half-baked measures like NCLB (eg, make schools "accountable" and they will somehow improve magically) does nothing to resolve the "environment gap", which in my opinion is probably one of the most critical factors in academic performance these days.
About half of public school funding comes from local property taxes, and as a result schools in rich neighborhoods have dramatically better equipment, facilities, and staff levels/pay.
There are huge disparities in school funding from one district to another, and the folks who get screwed are in poor districts, both in remote rural areas and in predominantly minority neighborhoods in inner cities.
I found this nice map in a google search just now: http://www.npr.org/2016/04/18/474256366/why-americas-schools...
* * *
The No Child Left Behind law was emphatically not about diverting extra money to poor performing students, I don‘t know where you got that idea.