Weir timed his sprint finish to perfection to take the title in 1:30:20.
With thousands of people lining the route to cheer him on, Weir was in a leading group of six racers that broke away early on, content to sit just off the front.
Weir was then second behind Switzerland's Marcel Hug in a leading pack of three, also including Australian defending champion Kurt Fearnley, with three miles to go.
The 33-year-old came into view of the finishing straight in the lead and pulled away from his rivals to complete a glorious end to a spectacular week. Hug came home in second place, with Fearnley clinching bronze.
Victory gave the British wheelchair athlete a clean sweep of four gold medals after earlier winning the 800m, 1500m and 5000m - T54 titles.
'It's a dream come true,' said Weir. 'Obviously I dreamed about winning all my races, but it was going to be a tough order. I just really had to dig deep.
It's a dream come true. Obviously I dreamed about winning all my races, but it was going to be a tough order. I just really had to dig deep.David Weir
'I did have lots of dreams about winning four gold medals but I think everyone has to dream. I knew I was capable of doing it, but I said I only wanted to win one gold medal because I didn't want to put myself under pressure.
'To tell you the truth, every race I did in that stadium (Olympic Stadium) I didn't feel under pressure because the crowd was just behind you even if you won or lost. It didn't matter what position you came in, they were still behind you and they still loved you.'
The USA's Shirley Reilly won the women's Marathon - T54 title in a time of 1:46:33, with Briton Shelly Woods taking silver and Sandra Graf of Switzerland the bronze.
Reilly said afterwards: 'I thought that with half a mile to go I could make a scrap of it, and I was lucky that it was me who finished first.'
In the men's Marathon - T12, Spain's Alberto Suarez Laso won the title ahead of Elkin Alonso Serna Moreno and Abderrahim Zhiou.
Brazil's Tito Sena prevailed in the men's Marathon - T46, with Abderrahman Ait Khamouch claiming the silver medal and Frederic van den Heede the bronze.