He finished the 115km pan flat stage ahead of Elia Viviani (Sky) and Andrea Guardini (Astana) in a time of 2hr 32min 31sec.
Cavendish now leads Stage 1 winner Giacomo Nizzolo (Trek-Segafredo) by four seconds with Jens Keukeleire (Orica-BikeExchange) another second in arrears on the general classification.
"I'm happy with that. We wanted to win today. I felt good," Cavendish said. "It was a very chaotic sprint in which I lost my lead out in the second last corner.
"I thought 'that's it', but we got back on. I followed Giant-Alpecin. I didn't want to go down, I had to brake at some stage.
"I was happy to be behind Sky in the last corner and pass them. It was incredible to pass through all the iconic sites of Abu Dhabi. It was impressive to see the buildings, the Grande Mosque, and the towers, and to finish in Al Marina.”