Originally the court of the Athenian archon, called the basileus, who used to give judgment in the stoa basilike. At Rome these courts of justice had their nave, aisles, porticoes, and tribunals; so that when used for Christian worship very little alteration was needed. The church of St. John Lateran at Rome was an ancient basilica.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Basilica from Infoplease: