[6] Gomaa was appoint minister of state to the cabinet of the United Arab Republic led by Zakaria Mohieddin on 2 October 1965.
[11] Gomaa resigned from his post as minister of Interior with other Gamal Abdel Nasser supporters in the cabinet on 13 May 1971.
[12] Gomaa's successor as minister of interior was Mamdouh Salem who was appointed to the post on 14 Mat 1971.
[14] Following this incident Gomaa was arrested and tried due to his alleged participation in the planned coup against Anwar Sadat.
[12][15] The reason for the arrest of Gomaa and others such as Sami Sharaf was that they had been supported by the ASU, the leftist figures affiliated with the Al Tali'a magazine, and the business elites.
[19] However, he was one of the Egyptian officials who preferred to get support from the Soviet Union, particularly after the defeat of Egypt in the Six-Day War in 1967.