Archaeological records indicate the presence of Aboriginal people in the Vancouver area from 8,000 to 10,000 years ago. The city is located in the traditional territories of the Squamish, Musqueam, and Tseil-Waututh (Burrard) peoples of the Coast Salish group. They had villages in various parts of present-day Vancouver, such as Stanley Park, False Creek, Kitsilano, Point Grey and near the mouth of the Fraser River. Europeans became acquainted with the area of the future Vancouver when José María Narváez of Spain explored the coast of present-day Point Grey and parts of Burrard Inlet in 1791. Francis Drake may have visited the area in 1579. The city takes its name from George Vancouver, who explored the inner harbour of Burrard Inlet in 1792 and gave various places British names.
The explorer and North West Company trader Simon Fraser and his crew became the first known Europeans to set foot on the site of the present-day city. In 1808, they travelled from the east down the Fraser River, perhaps as far as Point Grey. The Fraser Gold Rush of 1858 brought over 25,000 men, mainly from California, to nearby New Westminster (founded 14 February 1859) on the Fraser River, on their way to the Fraser Canyon, bypassing what would become Vancouver. Vancouver is among British Columbia's youngest cities; the first European settlement in what is now Vancouver was not until 1862 at McLeery's Farm on the Fraser River, just east of the ancient village of Musqueam in what is now Marpole. A sawmill established at Moodyville (now the City of North Vancouver) in 1863, began the city's long relationship with logging. It was quickly followed by mills owned by Captain Edward Stamp on the south shore of the inlet. Stamp, who had begun logging in the Port Alberni area, first attempted to run a mill at Brockton Point, but difficult currents and reefs forced the relocation of the operation in 1867 to a point near the foot of Dunlevy Street. This mill, known as the Hastings Mill, became the nucleus around which Vancouver formed. The mill's central role in the city waned after the arrival of the Canadian Pacific Railway (CPR) in the 1880s. It nevertheless remained important to the local economy until it closed in the 1920s.
The settlement which came to be called Gastown grew up quickly around the original makeshift tavern established by "Gassy" Jack Deighton in 1867 on the edge of the Hastings Mill property. In 1870, the colonial government surveyed the settlement and laid out a townsite, renamed "Granville" in honour of the then-British Secretary of State for the Colonies, Lord Granville. This site, with its natural harbour, was selected in 1884 as the terminus for the Canadian Pacific Railway, to the disappointment of Port Moody, New Westminster and Victoria, all of which had vied to be the railhead. A railway was among the inducements for British Columbia to join the Confederation in 1871, but the Pacific Scandal and arguments over the use of Chinese labour delayed construction until the 1880s.