During the second century of Gupta rule, Europe was being ravaged by a series of barbarian invasions as the Huns displaced other tribes from the central Asian steppes, resulting most notably in the fall of the Roman Empire in 476. A similar thing happened in India, with invasions of Hunic tribes on its northwest border creating instability (as well as devastating Buddhism by destroying temples and killing monks). When the Gupta Empire fell around 550, its territory fragmented into a number of smaller, rapidly-changing kindoms, and the "classical" era of Indian history came to an end; it was followed by the "medieval" era. This terminology is somewhat controversial, as it's sometimes seen as simply overlaying western ideas of history onto India. However, "medieval" India shares a number of traits with medieval Europe: most notably division into feuding kingdoms; increased agricultural production (although without Western-style feudalism); significant urbanisation; and religious puritanism (which came hand in hand with the increasing influence of brahmins).
Gandhi's finest moments came as he rushed from city to city, drawing on his longstanding reputation and following to calm the orgies of violence. It was during one of these missions, in early 1948, that he was assassinated by a Hindu nationalist outraged by his compromises with Pakistan. Gandhi was just one of over a million casualties of religious violence over these two years. In the midst of this whirlwind came the defining event in modern Indian history: independence from the British Raj in 1947. With it came the independence of Pakistan, originally composed of two noncontiguous territories: the majority of its land in west India, plus East Bengal. Over the next few years, India and Pakistan absorbed all the remaining princely states. Jinnah, the first leader of Pakistan, died only a year after independence, and an Islamic regime came to power; this fell to a military coup in 1958. In 1971, Pakistan's eastern territory fought a war of independence (aided by India) to become Bangladesh. Jinnah's dream of a nation united by religion had proved no match for major ethnic and linguistic differences.
India had been left impoverished and scarred by British occupation. The next seven decades of Indian history was better, but not rosy by any means. Under the leadership of Nehru, a backlash occurred against ideas associated with the West, such as free markets, the English language and even urbanism. The British Raj was replaced with a "License Raj", as the Indian government tried to create a planned economy by regulating the exact specifications of all business activity. It can scarcely be exaggerated how much bureaucracy this entailed - and with it, strong incentives for corruption and regulatory capture. Even if this kneejerk reaction was understandable at first, its longevity cannot be defended: the license raj, and the corruption that accompanied it, kept India deeply impoverished for the best part of a century, entrenched oligopolies of powerful businesses, and stifled innovation. Primarily responsible was Nehru's Congress Party, which remained in power for the first thirty years of independence: Nehru was followed, after his death in 1964, by his daughter Indira Gandhi.
Finally, reformers were in power. Significant economic liberalisation, and the partial dismantling of the license raj, occurred as conditions on an IMF bailout in 1991. These steps have boosted economic growth, but India is still in desperate need of more reform. In 2007, more than 150 billion USD was spent on popular subsidies, such as free electricity for farmers - a strategy which has already proven ineffective in lifting people out of poverty (this particular subsidy, for instance, mostly helps wealthier farmers who use more electricity, as well as contributing to severe power shortages and blackouts). Moving goods between India's 29 states can be more difficult than crossing international borders; India's rank in the Ease of doing Business index still hovers around 130th in the world. Public education is so bad that even many of the poorest parents shell out for private education (often illegally, since even the very common one-room schools needs licenses from 14 different departments to set up). Trains running hours late is the rule, not the exception - my two trains were delayed by 8 and 4 hours respectively, and the Guwahati Express sets the record with an average delay of over 10 hours. Labour policies are so restrictive that it's estimated the number of official (as opposed to black-market) jobs would be 30% higher without them. While India has the world's 6th-biggest economy, its GDP per capita is 25% less than that of Vietnam (which gained independence decades after India did, in far more devastating circumstances), and less than 1/4 of China's. The Indian government's main saving grace is that it remains democratic and has not murdered millions of civilians through induced famines or wars. By that measure at least, it ranks ahead of China, Russia, the US, the UK, and most of Western Europe.