Gandini became a member of the National Party while he was studying at university during the campaign for the 1980 constitutional referendum.[3]
In the 1984 election, he was elected alternate National Representative for the 42nd Legislature.[4] From 1985 to 1987 he served as secretary of the youth wing of the National Party, and between 1985 and 1988 as secretary of the youth of the Por la Patria sector.[5]
During the Lacalle Herrera administration, he was the first director of the National Youth Institute (INJU), a position he held until 1995, and from that position he promoted the 'Youth Card' program.[5] At the same time and since 1992, he presided over the National Post Office of Uruguay.[6]
In 1994 he endorsed Alberto Volonté for president, by joining the Propuesta Nacional sector led by Álvaro Ramos Trigo. In the election that year Gandini was re-elected as National Representative, but he joined the Senate after the appointment of Ramos Trigo as foreign minister in the administration of Julio María Sanguinetti.[7]
In 2004 he joined the National Alliance and was elected National Representative.[8] For the 2009 presidential primaries he endorsed Jorge Larrañaga for president.[9][10] Gandini's 2004-50 list was the most voted in Montevideo among those in the National Alliance sector, so he was re-elected National Representative for the 47th Legislature.[11] In June 2012 he announced that he would run for Intendant of Montevideo in the 2015 municipal elections.[12] However, in December 2014 he withdrew his candidacy for the Concertation Party (an alliance between the National and Colorado parties) because the Herrerist faction of the National Party defeated the Wilsonist in that year's election.[13] Instead, the party decided to nominate Álvaro Garcé.[14] Simultaneously, Gandini was re-elected National Representative for the 48th Legislature in the 2014 general election.[15]
In the 2019 presidential primaries Gandini supported Jorge Larrañaga for president.[16] In the general election he supported the party's candidate Luis Lacalle Pou and was elected Senator of the Republic.[17][18] In the campaign leading up to the referendum on the Law of Urgent Consideration of 2022, Gandini was one of the main National Party politicians in defense of the law.[19]