He entered into politics by joining the Sri Lanka Freedom Party led by Chandrika Kumaratunga, and contested the 2001 parliamentary elections with PA from Colombo District. After the UPFA victory in 2004, he was appointed Deputy Minister of Industry, Tourism and Investment Promotion. In 2010, Ranatunga left the UPFA and joined the Democratic Party of the DNA led by Sarath Fonseka, and was made the deputy leader of the Democratic Party. In November 2012, he resigned from the Democratic Party, but continued his affiliation with DNA. He endorsed Maithripala Sirisena in the 2015 Presidential election, and after Sirisena's victory Ranatunga was appointed Minister of Highways, Ports & Shipping.