In March 2015, Gallagher was appointed to fill the casual vacancy caused by the retirement of Senator Kate Lundy. She was appointed to Bill Shorten's shadow ministry later in the year, and elected to the Senate in her own right at the 2016 federal election. She was subsequently elected Manager of Opposition Business in the Senate. In December 2017, during the parliamentary eligibility crisis, Gallagher was referred to the High Court. The court ruled in May 2018 that she was disqualified from sitting in the Senate for failing to renounce her British citizenship before nomination for election in 2016. She returned to her previous Senate seat at the 2019 federal election.