The Abenaki Indians called the area Webhannet, meaning "at the clear stream", a reference to the Webhannet River. In 1622, the Plymouth Company in England awarded to Sir Ferdinando Gorges, Lord Proprietor of Maine, territory which included the Plantation of Wells. His young cousin, Thomas Gorges, acting as deputy and agent, in 1641 granted to Rev. John Wheelwright and other settlers from Exeter, New Hampshire the right to populate the land from northeast of the Ogunquit River to southwest of the Kennebunk River. Following the death of the elder Gorges in 1647, the Massachusetts Bay Colony laid claim to Maine. In 1653, Wells was incorporated, the third town in Maine to do so, and named after Wells, England, a small cathedral city in the county of Somerset. It then included Kennebunk, set off the year Maine became a state in 1820, and Ogunquit, designated a village within Wells by the legislature in 1913, then set off in 1980.
Wells was the resilient northeastern frontier of English settlement. Except for a few forts and garrisons, early attempts to colonize Maine above Wells were abandoned because of attacks by Native Americans allied with New France, which resented encroachment by New England in territory it considered its own, Acadia. Wells endured three major attacks, most famously the Raid on Wells in 1692. The region became less dangerous, however, after the Battle of Louisburg in 1745.
The town developed as a farming community, producing hay and vegetables. Other industries included shipbuilding and fisheries. In the 19th century, with the arrival of the railroad, the town's beautiful beaches attracted tourists. Many inns and hotels were built along the seashore. Today, tourism remains important to the economy.
Wells celebrated its 350th anniversary in 2003. The year-long celebration included a New Year's Eve party with fireworks, parade, a visit by the traveling Russian circus, concerts, historical reenactments, and more. The town commissioned a member of the celebration committee, Kristi Borst, to design a town flag. Her design portrays historic aspects of the Town's settlement and agriculture as well as the 2003 Town Hall and focus on tourism represented by a train. Also included is the motto she penned for the project: "Proud of our Past, Ready for our Future".