Following graduation, Gainey worked as a policy advisor to the Ministers of National Defence and Veterans Affairs, Bill Graham and John McCallum.[6] During this time, she became a close friend of future Canadian Prime Minister and fellow Montrealer Justin Trudeau, actively advising on his campaign to become leader of the Liberal Party of Canada.[7] Shortly after Trudeau's success, Gainey announced her intention to run for President of the party.
Gainey became President of the Liberal Party at the age of 36 in February 2014, succeeding businessman Mike Crawley. She won re-election in 2016, before stepping-down from the position in April 2018, at the end of her second term.
Following a break from federal politics, Gainey was briefly Chief Executive of the Policy think-tankCanada 2020, the advisory board of which is chaired by economist Mark Carney.[8]
In spring 2023, Gainey successfully ran for the Liberal nomination in the federal riding of Notre-Dame-de-Grâce—Westmount, beating Vice-President and general counsel of Air Canada, Fred Headon.[6] This was following the resignation of the riding's previous MP, Marc Garneau.[9] In the subsequent by-election, Gainey was elected with 50.87% of the vote.