This comes more than a month after Prodi beat Silvio Berlusconi at the polls.
Prodi's candidate, Giorgio Napolitano, an ex-communist 80-year-old life senator, secured 543 votes from the "grand electors" - parliamentarians and regional representatives - 38 more than the absolute majority needed.
The result on Wednesday is an important victory for Prodi who cannot take office until the new president is in place and gives him a mandate to form a government.
After the vote, Prodi told reporters he expected to be able to swear in his new government by next Wednesday - after Napolitano takes over as head of state from Carlo Azeglio Ciampi, the outgoing president.
Blow to Berlusconi
The result was the latest blow for Berlusconi who had refused to back Napolitano, saying his voters would not understand if his bloc backed a former communist.
But Prodi's coalition pushed their candidate through against the wishes of the opposition after three initial rounds of voting - during which a two-thirds majority was needed - resulted in political stalemate.
Berlusconi insists the result is
not the will of the people
Berlusconi grudgingly acknowledged Napolitano's election.
"We are still convinced that half of the country has been excluded," he said.
"This is not the will of the people but we wish him well and good work."
Napolitano's victory will have come as a relief for Prodi as it showed he does have the political stature to rally his troops to defeat Berlusconi who remains a strong force as head of the single biggest party in parliament.
But his inability to get his candidate elected in the early rounds has highlighted the problems he may face in pushing through his agenda with only a wafer-thin majority made up of diverse parties ranging from the centre to the hard left.
Napolitano, a former house speaker and interior minister who was appointed to the rare honorary position of senator for life last year, is expected to be sworn in next Monday as Italy's 11th post-World War Two head of state.
The post of president is largely ceremonial but the head of state has the power to name the prime minister, dissolve parliament and send legislation back to parliament.