Charles Barry was born in London on 23 May 1795, the fourth surviving son of the Westminster stationer Walter Edward Barry. As his mother died in 1798 and his father in 1805, he was brought up by his stepmother, Sarah Routledge. At the age of fifteen he was articled to the Lambeth firm of Middleton & Bailey who were surveyors rather than architects but encouraged him to exhibit his designs at the Royal Academy from 1815 onwards. In 1817 he became engaged to Sarah Rowsell, who brought a useful connection to Sir John Soane, and in the same year he decided to use a legacy from his father on an eighteen-month programme of foreign travel which eventually extended to three years. It took in Athens, Constantinople and Egypt as well as the continent, Barry initially travelling with Johan David Passavant, Charles Lock Eastlake, William Kinnaird and Francis Johnson. On his final tour of Rome and its environs from January 1820, he studied in the company of John Lewis Wolfe, a pupil of Joseph Gwilt and an enthusiast for Palladian architecture who subsequently gave up architecture for stockbroking but became Barry's lifelong mentor.
In September 1820 Barry commenced practice in Ely Place, London. He had the influential support of William John Bankes whom he had met at Philae and who secured for him the Commissioners' churches at Stand and Campfield in Manchester. These enabled him to marry Sarah in 1822. In 1823-24 he commenced a long series of competition wins with St Peter's, Brighton and the Schinkelesque Royal Institution in Manchester. It was not, however, until 1826 that he felt able to put his Italian Renaissance studies into practice at Brunswick Chapel, Hove, soon followed by his competition win for the Travellers' Club in Pall Mall, London, 1828, and the Villa Attree in Brighton, designed in 1827 and built in 1829, which was intended to be part of a much larger development.
In parallel Barry started to adopt more convincing neo-mediaeval forms, notably in his unexecuted neo-Norman designs of 1828 for Drummond Castle, which in some degree developed earlier proposals by William Stark. At his neo-Perpendicular King Edward VI Grammar School at Birmingham, begun in 1832, he recruited Augustus Welby Northmore Pugin to help with the details and the finishing. This collaboration extended to the Westminster Palace competition which he won on 29 February 1836 and which was to be his main preoccupation for the rest of his career.
Concurrently with the Westminster work Barry had a large country house practice and a sizeable commercial practice, initially obtained through the influence of Lord and Lady Holland, at Holland House, Kensington. Through them the Duke of Bedford, the Marquess of Lansdowne, and the Duke and Duchess of Sutherland became clients, the success of his work for them bringing a wider clientele which transcended political boundaries. Dunrobin was much enlarged for the Sutherlands, substantially to his designs, but his executed commissions for other Scottish clients were limited to formal gardens. In his later years at least he visited Scotland only once in 1848, but he acted as consultant on a number of projects, notably the proposed new college at Woodlands Hill for the University of Glasgow and the National Galleries of Scotland.
Barry was elected Royal Academician, admitted a Fellow of the Royal Society, and awarded the RIBA's Royal Gold Medal in 1850. From the 1840s onwards he had been elected to numerous overseas professional bodies and academies including the American Institute of Architects, and in 1852 he was knighted on the occasion of the first use of the Royal Entrance at the Palace of Westminster. But his practice never made much money and a well-publicised dispute with the Duke and Duchess of Sutherland in 1855 over a massive arrears of fees drastically reduced his private practice. His last years were severely restricted by heart trouble, aggravated if not actually caused by disputes at Westminster, and were largely devoted to a master-plan for the rebuilding of Clumber for the Duke of Newcastle. Failing health compelled him to decline the presidency of the RIBA on the death of Earl de Grey in 1859.
Barry died of a heart attack at Elm House, Clapham Common on 12 May 1860. His practice was continued by a younger son Edward Middleton Barry, born 7 June 1830, who had been articled to Thomas Henry Wyatt; his eldest son, Charles Barry junior, born 21 September 1823, had left the practice in 1847 to form a partnership with a senior assistant, Robert Richardson Banks.