The Fegafoot first cancelled a Costa press conference scheduled for Friday morning before announcing the departure of the 45-year-old former Portugal defender.
Garrido must then prepare for the crucial World Cup qualifier away to Mali in Bamako on November 12.
Costa, who had been in the job since 2014, oversaw a 0-0 draw at home to Morocco in a 2018 World Cup qualifier in his final match in charge last month.
His absence from the draw for the Cup of Nations in the capital Libreville on October 19 did not go down well in the country.
Gabon will play Guinea-Bissau in the opening match of the tournament in Libreville on January 14 before also facing Burkina Faso and Cameroon in Group A.
Ex-Porto stopper Costa had initially been let go at the end of June due to his "uneven" results but was then reappointed in August with the aim of getting to the final of the Cup of Nations.
He was the best-paid coach in Africa with a monthly salary of 70,000 euros ($78,000).