An outline history:

The Catalan architect, Antoni Gaudí, is now so closely associated with the Basílica i Temple Expiatori de la Sagrada Família (Basilica and Church of Atonement of the Holy Family) that it is surprising to learn that he was not the first choice to build the church.
First choice was the architect Francesc de Paula del Villar, and the driving force to build came from a devout bookseller, Josep María Bocabella.
Bocabella was troubled by the growing secularism, liberalism and other revolutionary ideologies accompanying industrialisation in Barcelona in the late 19th century. He wanted to counter these secular “sins” by building a church dedicated to the Holy Family. Such a church would be jointly an expression of repentance and a confirmation of traditional family life, the prime example of which was the Holy Family (Joseph, Mary and Jesus). Together with like-minded devotees, Bocabella established the Associació de Devots de Sant Josep (aka the Josephines) which bought the land for the church and met the costs.
The Josephines’ first choice, Villar, began the project in 1882, but quit a year later. Gaudí was still relatively young (31 years old) and unknown and untried. Only six years out of Barcelona’s School of Architecture, he had just received his first major commissions (Casa Vicens and El Capricho, both in 1883) and had designed no religious buildings.
But the devotees of St Joseph had a vision and Gaudí was persuasive, with a bold imagination. And his application had the support of the eminent architect Joan Martorell. In addition, the concept of redemption complemented Gaudí’s devout Catholicism and increasingly ultra-conservative convictions perfectly.
Although very busy with other commissions from 1883 to around 1912/13, Gaudí continued to work on the Sagrada Familia. It was a long term project but, as he pointed out to his helpers when delays occurred owing to his change of plans, “My client (i.e. God) is in no hurry.”
But neither Gaudí nor the Josephines could have anticipated at the beginning that the work would be nowhere near completion in their lifetimes nor that it would become such a major statement in world architecture.
A neo-Gothic church by design, its projected completion date now is 2026, the centenary of Gaudí’s death. For a “modern” building to take 144 years (1882-2026) to complete is unheard of, but the Sagrada Familia’s construction would hardly raise an eyebrow during the heyday of Gothic architecture (late 12th century to the 16th).
When he began in 1883, Gaudí quickly stamped his personality on it. When he died on June 10, 1926, three days after being struck down on Barcelona’s Gran Vía by a street car, the church was far from finished.
Photos taken in 1925 show that only the eastern façade –the Nativity portal—and its towers had been completed (even so, they were still covered by scaffolding). So, in fact by far the largest part of the church that we now see was built (and continues to be built) well after Gaudí’s fatal accident, and numerous architects and sculptors since have been involved in its construction.
Work continued slowly after Gaudí’s death until the outbreak of the bloody Spanish Civil war in 1936. Anarchists, hostile to religion and to the historic power wielded by the Catholic Church, burned Gaudí’s plaster models and sketches in an attempt to prevent the Sagrada Familia from being completed.
However, Gaudí’s coffin –buried in the church’s crypt— was left untouched; even the anarchists understood full well that for many Barcelonans of all classes, Gaudí was a saint. (In fact, since 2000 there has been a formal move to seek the beatification of Gaudí, popularly known as “God’s architect.” The application is receiving favourable consideration)
Work on the Sagrada Familia resumed gradually after the Civil War was over (1939), beginning with a reconstruction of Gaudí’s models drawn from old photos, some published plans and notes taken down by his co-workers plus some educated guesswork based on what Gaudí had already built before he died. It was a difficult task because Gaudí was notorious for avoiding detailed architectural designs because he tended to change plans as buildings developed.

Progress in the 1950s and 60s was slow. The four towers above the south western Passion façade were not completed until 1976 and work on the scenes in the façade itself continued well into the 1980s.
The pace picked up in the 80s fuelled by increased tourism and the use of computer technology to cut stones. By 2010 the intricate high nave was completed, a stage celebrated by the consecration of the church as a basilica** by Pope Benedict XVI in November of that year.

Nowadays the Sagrada Familia is to Barcelona what the Guggenheim Museum is to Bilbao, the Opera House to Sydney (Australia), Khalifa Tower to Dubai etc… an iconic feature that immediately identifies the city and distinguishes it as bold and visionary.
Note: The Sagrada Familia is frequently and incorrectly called a cathedral. Barcelona already has a cathedral –built mostly between 1298 and 1460– in the ancient Barrio Gótico. A cathedral is the seat of a bishop; a basilica is a church granted special status by a pope for unusual historical or sacred reasons. There are four major basilicas, all within Rome. All others, including the Sagrada Familia, are minor basilicas.
Sources:
Eaude, Michael Catalonia: A Cultural History Oxford 2008
Hughes, Robert Barcelona New York 1993
Stich, Sidra Art-Sites Spain: Contemporary Art and Architecture San Francisco: Art-Sites 2003
Zerbst, Rainer Antoni Gaudí Koln 1991
Image of the Sagrada Familia in 1925: http://www.sagradafamilia.cat/sf-eng/docs_instit/historia1_c.php
Image of the assion facade: Pasion Façade “Sagfampassion” by Wjh31 – Own work – http://lifeinmegapixels.com. Licensed under CC BY 3.0 via Wikimedia Commons – http://commons.wikimedia.org/wiki/File:Sagfampassion.jpg#/media/File:Sagfampassion.jpg
Superb photo of the crossing between nave and trasepts: “Sagrada Familia nave roof detail” by SBA73 from Sabadell, Catalunya – Tot conflueix / All’s conected. Licensed under CC BY-SA 2.0 via Wikimedia Commons –http://commons.wikimedia.org/wiki/File:Sagrada_Familia_nave_roof_detail.jpg#/media/File:Sagrada_Familia_nave_roof_detail.jpg