"It is clear that I have a lot to learn about the lively debate concerning the evolution of the family," Barilla said in a videotaped apology.
"Through my entire life, I have always respected every person I've met, inlcuding gays and their families, without any distinction," Barilla said in a video apology posted on the company's Facebook page.
He said he was "depressed" and "saddened" by reaction to his comments.
Barilla had said to an Italian radio station that his company would never use a gay family in its advertising.
"I would never do (a commercial) with a homosexual family, not for lack of respect but because we don't agree with them. Ours is a classic family where the woman plays a fundamental role," Barilla, 55, said in an interview with Radio 24 on Wednesday.
"It is clear that I have a lot to learn about the lively debate concerning the evolution of the family," he said in the apology.
Barilla - one of the best known pasta brands around the world - is one of Italy's biggest advertisers, and for many years has used the image of a happy family living in an idealized version of the Italian countryside, with the slogan: "Where there's Barilla, there's home."
In the interview, Barilla had said he opposed adoption by gay parents, but was in favor of allowing gay marriage, which is not legal in Italy. His comment about advertising was in response to a direct question about whether he would ever feature a gay family in his company's commercials.
If gays "like our pasta and our advertising, they'll eat our pasta, if they don't like it then they will not eat it and they will eat another brand," he said.
(Read more: Gay investors seek equality from SEC )
Aurelio Mancuso, head of gay rights group Equality Italia, said Barilla's comments were an "offensive provocation" and called for a boycott of the company's pasta, sauces and snacks.
"We accept the invitation from the Barilla owner to not eat his pasta," Mancuso said. Many Italians used social media to voice support for a boycott.
(Read more: Putin says no discrimination against gays in Russia )
Alessandro Zan, a gay member of parliament, said on Twitter: "You can't mess around with consumers, including gay ones."
- Reuters contributed to this article.