The two riders finished shoulder to shoulder prompting a 10-minute delay as the race organisers pored over the photo finish in a bid to split them.
They opted against calling it a dead heat and gave Merlier, 30, the win by the slimmest of margins.
"I was not sure," Merlier said afterwards.
"I know I did a good jump in the end, and I knew when I started my sprint that it was a good sprint.
"But Caleb was coming from the wheel and you know he's a dangerous guy if he is in the wheel. In the end it was really close."
Astana Qazaqstan Team's Mark Cavendish was third after a windy ride of 151km on the United Arab Emirates' northern coast.
Merlier's team-mate and compatriot Remco Evenepoel, who won last year's Vuelta a Espana, is sixth overall thanks to a bonus after finishing eighth on the day.
The world road race champion is among the favourites for the general classification in the middle east.
"That was a windy and good start of the week here," he said on social media.
"Strong teamwork finished off by @MerlierTim!
"Focus on tomorrow's TTT," he added before Tuesday's second of seven stages, a team time trial over 17.2km up the coast in Khalifa Port.
UAE Team Emirates' double Tour de France champion Tadej Pogacar is sitting out his outfit's home event.
The 24-year-old Slovenian chose instead to start his season by winning the Vuelta a Andalucia at the weekend.