Panama reached Russia 2018 in a dramatic final round of qualifying matches, with Roman Torres' late goal downing rival Costa Rica as the United States lost to Trinidad and Tobago.
Gomez's side found the going predictably tough at the tournament, losing all three matches in Group G, including a 6-1 defeat to England in a game where they were 5-0 down at half-time.
"Now, for me, it is the time for the difficult act of moving my feet from the place where I have put my heart," Gomez said in a statement published on the Panama Football Federation's (FEPAFUT) official website.
"Russia 2018 was the beginning, I fulfilled my promise to take Panama to its first football World Cup and that will remain in my heart, and those of all Panamanians, for life.
"Panama is on a secure path to continue making history in football."
Gomez, 62, also led his native Colombia at France 1998 before taking charge of Ecuador at the 2002 World Cup.