Silkeborg Born in
Ikast, Gammelby joined
Silkeborg IF's academy as an under-14 player after time in
FC Midtjylland's youth system, progressing through Silkeborg's elite pathway (Sølystskolen elite classes, Silkeborg Efterskole and Silkeborg Fodbold College) before promotion to the first team. As a youth prospect he initially played as a
striker, later converting to defence at under-19 level. Gammelby made his senior debut on 27 March 2014 in a 1–0 away win over
Hobro IK in the
Danish 1st Division, starting at
centre-back amid injuries to regulars in the position. The following month he signed a first senior deal through 2017; initially part-time to complete upper-secondary studies, becoming full-time from summer 2015. By the
2016–17 season, he had established himself as first-choice at
right-back in the
Danish Superliga, starting 33 league matches that season, and in 2017 he was voted Silkeborg's Player of the Year. The
2017–18 campaign marked his breakout offensively, with six Superliga goals in 34 appearances from right-back.
Brøndby In May 2018, it was reported that Gammelby would leave Silkeborg to join
Brøndby in summer 2018, having agreed to a five-year contract after a breakout season for Silkeborg. He was assigned shirt number 2. On 29 July 2018, Gammelby made his debut as a substitute against
Hobro IK, which ended in 2–1 win. During his first season in Brøndby, he struggled to make the starting lineup with head coach
Alexander Zorniger preferring first
Johan Larsson and since
Kevin Mensah at the
right back position. Gammelby made 17 appearances and scored one goal during his first season at the club. During the
2019–20 season under new head coach
Niels Frederiksen, Gammelby continued to struggle to make the starting lineup, with Frederiksen preferring Mensah and Larsson at his position. As Brøndby transitioned into a
3–5–2 formation during the fall, and left back
Anthony Jung began playing in central defense with Mensah transitioning to the left back position as well as Larsson's contract expiring, Gammelby was expected to play more regularly during the latter half of the season.
Loan to Lyngby On 5 October 2020, transfer deadline day, Gammelby moved to Superliga rivals
Lyngby Boldklub on a season-long loan with an option to buy. He made his debut two days later, on 7 October, in a 5–4 win over
Brønshøj in the
Danish Cup. He suffered relegation to the
Danish 1st Division with the club on 9 May 2021 after a loss to last placed
AC Horsens before returning to Brøndby after his loan deal expired. This happened despite experiencing a strong season individually, scoring 4 goals in 27 total appearances as he was the preferred option as right winger for the team.
Return to Brøndby After his loan at Lyngby, Gammelby returned to Brøndby ahead of the
2021–22 season and featured extensively in pre-season, including outside his usual right-back role. He made his first competitive appearance of the season as a half-time substitute in the Superliga opener away to
AGF on 18 July 2021, a 1–1 draw. On 17 August 2021, he made his
UEFA Champions League debut in a 2–1 away defeat to
Red Bull Salzburg in the play-off first leg, starting in central midfield amid a Brøndby squad hit by
COVID-19 absences. He also featured in the second leg on 25 August, coming on in the 59th minute for
Kevin Mensah; Brøndby again lost 2–1 to go out 4–2 on aggregate.
Loan to Miedź Legnica On 21 January 2022, Gammelby was loaned out to Polish club
Miedź Legnica for the rest of the year. He was recalled from his loan on 29 August 2022, to cover for injured players in the Brøndby team.
Second return to Brøndby Gammelby made his competitive return for Brøndby on 4 September 2022, as he was preferred as right-back by head coach
Niels Frederiksen ahead of
Sebastian Sebulonsen in a 2–0 league win against
AC Horsens. He scored his first goal after returning on 30 October, opening the score in the second minute against
AaB.
HamKam On 14 February 2023, Gammelby signed for Norwegian
Eliteserien club
HamKam, joining from Brøndby and slotting in at right-back under head coach
Jakob Michelsen. He quickly established himself as a first-choice wing-back and scored his first Eliteserien goal for the club with a stoppage-time winner in a 3–2 home victory over
Stabæk on 23 July 2023. On 3 September, he also netted in a 4–4 draw against league leaders
Bodø/Glimt. Across the
2023 league campaign he made 24 Eliteserien appearances and scored two goals for HamKam. In early September, HamKam announced that they had agreed to sell Gammelby to his former club Silkeborg with the transfer to take effect after the season; he remained with HamKam through the autumn run-in as the club secured its top-flight status for 2024.
Return to Silkeborg On 4 September 2023, Silkeborg announced that Gammelby was set to return to the club on 1 January 2024, after a five-and-a-half-year absence. On 16 March 2025, Gammelby scored to put his team ahead against his former club Brøndby, but his goal only earned Silkeborg a 2–2 away draw on the final day of the
Danish Superliga regular season, leaving them outside of the top six. On 7 May, he scored once again against the same opponent, this time the winning goal in Silkeborg's 2–1 victory over Brøndby in the
2024–25 Danish Cup semi-final second leg, securing his team's spot in back-to-back Danish Cup finals. On 14 August, Gammelby scored his first goal in European competitions in a 2–2 away draw against
Jagiellonia Białystok during the
UEFA Conference League third qualifying round. ==International career==