Things went better for Gomes at Euro 2004, where he played each game and, after coming on as a half-time substitute, scored the winning goal against Spain to send the hosts through to the quarter-finals. He was often injured during the nation's 2006 World Cup qualifying campaign, only managing to play four times, with one goal; he found limited time at the final stages and only made two appearances, but managed to find the back of the net with a header against hosts Germany in the third-place playoff, a 1–3 defeat.