The pope, wrapping up his trip to the country where more than 90 percent of the population is officially Catholic, made his appeal in the shrine city of Fatima on a day that started with a Mass attended by up to half a million people.
In his afternoon address to Catholic charity and social workers, the 83-year-old German pope said he "deeply appreciated" initiatives aimed at defending what he said were "essential and primary values of life."
Among these values, he said, was "the family, founded on indissoluble marriage between a man and a woman," which is Vatican-speak for its opposition to gay marriage.
The audience applauded when the pope said abortion -- which has been legal in Portugal since 2007 -- and threats to heterosexual marriage were "among some of the most insidious and dangerous challenges facing the common good today."
Portugal's parliament last January passed a bill by the minority Socialist government of Prime Minister Jose Socrates that would legalize same-sex marriages.
The government rejected alternative proposals by the center-right opposition for civil partnerships and a referendum on gay marriage.
President Anibal Cavaco Silva is under great pressure from the Church and conservative groups not to ratify the bill. If he vetoes it, parliament can override the veto with another vote.
On Thursday morning a crowd of up to half a million people turned out to greet the pope at one of holiest shrines in the 1.2 billion-member Catholic Church.
Pilgrims carrying banners and national flags braved a dawn drizzle in the town where the Church believes the Madonna appeared to three poor shepherd children in 1917 and gave them three messages in the form of visions.
The first two were revealed soon and concerned a vision of hell, the prediction of the outbreak of World War Two, a warning that Russia would "spread her errors" in the world, and the need for general conversion to God and the need for prayer.
The "third secret" intrigued the world for half a century before it was revealed, inspiring books, cults convinced that it predicted the end of the world, and even a hijacking.
In 2000, the Vatican said the secret was a prediction of the 1981 assassination attempt on Pope John Paul on May 13, the same day of the first reported apparition in 1917.
SIC: REUTERS