Early career Gojak started playing football at a local club, before joining the youth academy of his hometown team
Željezničar in 2009. In January 2014, he switched to
Olimpic. He made his professional debut against
Velež on 1 March at the age of 17. On 15 March, he scored his first professional goal against
Rudar Prijedor, which secured the victory for his squad.
Dinamo Zagreb In May, Gojak was transferred to Croatian outfit
Dinamo Zagreb for an undisclosed fee. He made his official debut for the team in a
Croatian Cup game against
Istra 1961 on 3 March 2015. Three weeks later, he made his league debut against the same opponent. He won his first title with the club on 2 May, when they were crowned league champions. On 14 May 2016, he scored his first goal for Dinamo Zagreb in a triumph over
Lokomotiva. Gojak debuted in the
UEFA Champions League away at
Lyon on 14 September. In March 2017, he extended his contract with the squad until June 2023. He scored four goals in a defeat of
Cibalia on 29 April. Gojak played his 100th match for the side against their
biggest rivals Hajduk Split on 26 May 2019. In October 2020, he was loaned to Italian outfit
Torino until the end of the season. He made his 200th appearance for Dinamo Zagreb on 15 May 2022 against
Šibenik.
Ferencváros In August, Gojak signed a three-year deal with Hungarian team
Ferencváros. He made his competitive debut for the squad on 4 September against
Újpest. On 18 September, he scored his first goal for Ferencváros in a
Magyar Kupa tie against
Bicskei. Seven months later, he scored a brace in a defeat of Újpest, which were his first league goals for the side. He won his first trophy with the club on 5 May 2023, when they secured league title.
Rijeka In September 2024, Gojak moved to
Rijeka on a contract until June 2026. On 14 September, he debuted officially for the team against
Gorica. He won his first piece of silverware with the club on 25 May 2025, when they were proclaimed league winners. On 30 July, he scored his first goal for Rijeka in a
UEFA Champions League qualifier against
Ludogorets. ==International career==