At the 1961 general election, Mac Giolla unsuccessfully contested the Tipperary North constituency for Sinn Féin. In 1962, he became President of Sinn Féin, and was one of the people who moved the party to the left during the 1960s. In 1969, Sinn Féin split and Mac Giolla remained leader of Official Sinn Féin. It was also in 1962 that Tomás married May McLoughlin who was also an active member of Sinn Féin as well as Cumann na mBan, the women's section of the IRA. In 1977, the party changed its name to Sinn Féin the Workers Party and in 1982 it became simply the Workers' Party. Mac Giolla was elected to Dublin City Council representing the Ballyfermotlocal electoral area in 1979 and at every subsequent local election until he retired from the council in 1997. In the November 1982 general election Mac Giolla was elected to Dáil Éireann for his party. In 1988, he stepped down as party leader and was succeeded by Proinsias De Rossa. He served as Lord Mayor of Dublin from 1993 to 1994 and remained a member of Dublin Corporation until 1998. While president he was regarded as a mediator between the Marxist-Leninist wing headed by Sean Garland and the social democratic wing of Prionsias De Rossa. At the 1992 special Ard Fheis he voted for the motion to abandon democratic centralism and to re-constitute the party much as the Italian Communist Party became the Democratic Party of the Left. However the motion failed to reach the required two-thirds majority and after the departure of six Workers' Party TDs led by De Rossa to form the new Democratic Left party in 1992, Mac Giolla was the sole member of the Workers' Party in the Dáil. He lost his Dáil seat at the general election later that year by a margin of just 59 votes to Liam Lawlor of Fianna Fáil. In 1999, Mac Giolla wrote to the chairman of the Flood Tribunal calling for an investigation into revelations that former Dublin Assistant City and County Manager George Redmond had been the official supervisor at the election count in Dublin West and was a close associate of Liam Lawlor. In 2003, Redmond was convicted of corruption by a Dublin court but subsequently had his conviction quashed due to conflicting evidence. In his eighties Mac Giolla continued to be active and was a member of the group which campaigned to prevent the demolition of No. 16 Moore Street in Dublin city centre, where the surrender after the Easter Rising was completed. He also served on the Dublin '98 committee to commemorate the 200th anniversary of the 1798 Rebellion. He died in Beaumont Hospital in Dublin on 4 February 2010 after a long illness.