Lawmakers voted by 197 votes to 28 to confirm Iranian Red Crescent chief Mohammad Farhadi in the sensitive job, which has responsibility for Iran's universities and students, whose political activities are heavily monitored by the regime.
Farhadi served as health minister from 1997 to 2001 under reformist president Mohammad Khatami.
But unlike the two previous nominees whom lawmakers rejected, he was not accused of links to the "seditionist" movement that took to the streets in protest at hardline president Mahmoud Ahmadinejad's controversial re-election in 2009 before being suppressed by the regime.
Signup to our newsletter and follow us on Facebook and Twitter!
The earlier rebuffs underscored the pressure that Rouhani, a moderate elected in June 2013, faces from a parliament dominated by conservatives at odds with his desire to open up the country to the West.
His second pick -- Fakhroddin Ahmadi Danesh-Ashtiani, who served as deputy education minister under Khatami -- was rejected by lawmakers last week after they screened video footage of him calling for the closure of universities in protest at Ahmadinejad's re-election.
The science ministry post has been vacant since August when parliament sacked Reza Faraji Dana, accusing him of appointing too many officials with links to the 2009 protests.
The challenge was crushed by the regime but dozens of people died and thousands were arrested, many of them students.