A total of 253 deputies backed the government, 232 voted against and two abstained, according to results from electronic voting displayed by the parliament's official channel.
Members of the government congratulated a smiling Prime Minister Manmohan Singh and the head of the governing Congress party, Sonia Gandhi, the footage showed.
The result came despite a furore in parliament surrounding opposition allegations that the ruling coalition paid out large sums of cash in bribes to ensure it won the vote.
The confidence vote was triggered by left-wing and communist parties, who withdrew their support for Singh earlier this month over their opposition to the civilian nuclear deal with Washington.
The deal with Washington -- which is still subject to several more stages of approval -- is designed to bring India into the global loop of nuclear commerce after decades of isolation.
It would allow India, which has nuclear weapons and refuses to sign the nuclear Non-Proliferation Treaty,