"Too bad there were 50 and not 100," José de Jesús Manzo Corona wrote.
Manzo Corona had been working for the Development and Social Integration Secretariat in Mexico's Jalisco state. Word of his comments spread rapidly on social media, drawing swift condemnation from authorities hours later.
Gov. Aristóteles Sandoval posted a Facebook message of his own, announcing his decision to fire Manzo Corona "for his homophobic comments" online.
"My government promotes respect and inclusion. These are our values," Sandoval wrote. "Discriminatory expressions will not be tolerated under any circumstance."
Manzo Corona couldn't be reached for comment.
He posted what he said was an apology on Facebook, saying he simply did not agree with what he called "gay ideology."
"If I offended someone with a different preference I am sorry," he wrote.
The posts have since been removed from his page.
The Development and Social Integration Secretariat operates a number of programs dedicated toward helping people in poverty.
Its secretary, Miguel Castro Reynoso, said the agency's role made it all the more important to respond swiftly to the online post.
"We are the first people who should be tolerant, those of us who serve the people," he wrote on Twitter.
"These kinds of expressions are terrible, they're very stupid expressions. And I think that we cannot under any circumstance accept or permit that these types of things happen," he told CNN en Español.