You can roughly divide India into two parts, the British controlled, and the non-British controlled, based on the pre-independence situation.
The british controlled areas, mainly the northern states like UP, bihar, bengal have huge number of poor families. UP has too many people, and most of them are poor.
The non British controlled ares, like Maharashtra and some southern states, are generally a bit better off, and here is where you find most rich and middle class.
The central states are riddled with decades old insurgency, which could be solved using military, but govt doesn't want to use military on it's own people. These areas contain tribal people, and they are very poor.
Now, all this is not a perfect science, but this is how it generally is. Now when a foreigner visits India, he/she might visit places like Delhi, Mumbai, Bangalore, maybe North eastern Himalayan areas, Goa and some beaches in Lakshadweep. The image you get is that of extremely rich people and extremely poor people, along with a lot of middle-class people living in these cities.
But outside these cities, when you go to central India(you won't, as rebels will kidnap you), you can see extreme poverty. Same with other non-tourist areas.