The BBC's Emma Jane Kirby at Lourdes says Benedict looked elated and moved by the rapturous welcome he received from the crowds - some of the faithful had queued through the night to make ensure their place.
Security has been tight, with more than 3,000 police officers drafted in to the area.
After his arrival at the shrine, in the foothills of the Pyrenees, Benedict prayed at the Grotto of Massabielle, also known as the Cave of Apparitions.
The riverside site is where 14-year-old peasant girl Bernadette Soubirous told local clergy in 1858 the Virgin Mary had appeared to her.
When he arrived on Saturday night, Benedict also drank water from a spring that believers say has miraculous healing powers.
Pope Benedict XVI has celebrated his first Mass at Lourdes
Saying Mass from under white canopies shaped like sails, the Pope told his listeners to be true to their faith because "it tells us that there is a love in this world that is stronger than death, stronger than our weakness and sins".
He said: "The power of love is stronger than the evil which threatens us."
Pope Benedict arrived in Paris on Friday for his first visit to France since becoming Pope in 2005. He was welcomed by French President Nicolas Sarkozy, whom he praised for promoting the role of religion in society.
France staunchly upholds a 1905 law that enshrines the separation of Church and state, but Mr Sarkozy has supported efforts to ease the country's strict secularism law.
France is a Roman Catholic country but Sunday Mass attendance is now below 10%.
Before his visit, a French newspaper poll showed that more than half of those questioned had a positive view of the Pope.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.