He was one of the eleven children of António José Gomes, (Santo Estevão, Chaves, ? – Lisbon, 1 July 1922) and wife, Idalina Júlia Monteiro da Costa (Chaves, 27 May 1880 – Porto, 18 February 1967).
On 8 December 1952, Gomes married Maria Estela Veloso de Antas Varajão (born 23 March 1927 in Viana do Castelo), daughter of João de Campos Varajão and his wife Angélica Martins Veloso (b. Barcelos, Barcelos), at the See of Viana do Castelo. The couple had only one son, Francisco da Costa Gomes.
In 1961 Costa Gomes, acting as under-secretary of state for the Army, was involved in a constitutional "coup d'état" headed by the Minister of Defense, General Júlio Botelho Moniz, that tried to convince President Américo Tomás to remove an aged António de Oliveira Salazar from the premiership.
In 1970 he occupied the post of Commander of the Military Region of Angola, where he overhauled the chief-command and was the first to try to establish a military agreement with the National Union for the Total Independence of Angola (UNITA) against the People's Movement for the Liberation of Angola (MPLA) and the National Liberation Front of Angola (FNLA).
On 12 September 1972 he was called back to Portugal to occupy the post of Chief of the Armed Forces—replacing General Venâncio Deslandes—but he was replaced in March 1974, a few days before the Carnation Revolution of 25 April 1974, because he had refused to swear his loyalty to the President of the Council of Ministers Marcello Caetano in a public ceremony.
After the Revolution he was one of the seven military leaders who made up the National Salvation Junta. Between 25 April and 30 September he was the second-in-command of the Portuguese state, behind António de Spínola.
He assumed the Presidency of the Republic when named by the Junta after the resignation of Spínola on 30 September 1974, and occupied the post until 27 June 1976 when, in the first Presidential election, the Portuguese chose General Ramalho Eanes to succeed him. He received an honorary promotion to Field Marshal in 1982.
Gomes was one of eleven children of António José Gomes (Chaves, Santo Estêvão – Lisbon, Socorro, 1 July 1922) and wife (m. Chaves, 17 January 1901) and wife Idalina Júlia Monteiro da Costa (Chaves, 27 May 1880 – Porto, 18 February 1967).