Having survived a tight lbw appeal early on, the former England captain went on to reach three figures off 202 balls with 16 fours.
The Essex opener shared a 134-run second-wicket stand with Tom Westley but fell for 110 as he pulled a short ball from Dean Elgar to James Hildreth.
But, Westley's unbeaten 86 ensured the visitors chased down 255 in 84.1 overs.
In his first competitive match since stepping down as skipper of the national side, Cook rarely looked troubled while at the crease.
Resuming overnight unbeaten on four, Cook signalled his intent by hitting two boundaries from the first over of the day before Craig Overton was convinced the England batsman had been trapped lbw only for umpire Graham Lloyd to remain unmoved.
Despite 30 wickets falling in the first two days, the hosts' bowlers struggled and Nick Browne shared an 82-run opening partnership with the England opener before being caught behind off Jamie Overton for 35.
Cook batted on unfazed, as new Somerset captain Tom Abell ran out of options, and left the visitors requiring just 39 runs to win when he was dismissed.
A rejuvenated Westley, who made just 10 in the first innings, saw Essex home as he drove seamer Lewis Gregory to the boundary.

The price of US crude was up 56 cents to $44.67 a barrel, helping to lift shares in oil giant Chevron by 1.9%.
The Dow Jones rose 229.09 points to 16,600.05, while the S&P 500 added 25.06 points to 1,978.09. The Nasdaq was up by 54.76 points at 4,860.52.
Investors are expected to remain cautious ahead of Thursday's Federal Reserve meeting.
Analysts are still split over whether the Fed will decide to raise rates for the first time in nine years.
The latest economic data showed that US retail sales rose 0.2% last month, which was slightly below forecasts.
So-called core retail sales - which exclude cars, fuel, building materials and food services - were up 0.4% in August.
Separate figures showed that US manufacturing output fell by 0.5% in August, the sharpest decline since January 2014.
The drop was mostly caused by carmakers cutting back production, with car output down 6.4%, the biggest fall for three years.

The deal for Pearson, 24, who scored nine goals in 51 appearances in all competitions last season, is a record for an Accrington sale.
The versatile defender is Barnsley's 11th summer signing ahead of their Championship season-opener on Saturday.
"Matty has some exceptional qualities that we feel we can work with and make better," boss Paul Heckingbottom said.
Pearson began his career with Blackburn Rovers and played for Rochdale and Halifax Town before joining Stanley in May 2015, going on to make 103 appearances.
Barnsley begin their Championship campaign at Bristol City on Saturday.
Find all the latest football transfers on our dedicated page.

Jay Brenton Liptrot, 43, was among the first on the scene of the blaze in Prestatyn in October, 2012.
He gave evidence at the trial of one of the tenants, Melanie Smith, who was convicted of five murders.
Mr Liptrot will appear before Prestatyn magistrates on Friday.
The blaze resulted in the deaths of Lee-Ann Shiers, 20, her partner Liam Timbrell, 23, their son Charlie, 15 months, Ms Shiers' nephew Bailey, four, and niece Skye, two.
Alastair Cook's masterful century guided Essex to an eight-wicket victory over Somerset at Taunton.
[NEXT_CONCEPT]
(Close): US markets closed higher, with energy stocks leading the way following a rise in the price of oil.
[NEXT_CONCEPT]
Barnsley have signed defender Matty Pearson from Accrington Stanley on a three-year deal for an undisclosed fee.
[NEXT_CONCEPT]
A firefighter who owned the house in which five people died in an arson attack has been summonsed to appear in court in connection with manslaughter through gross negligence.