Hamilton led the season opener from pole but found himself behind Vettel when the Ferrari driver took advantage of a Virtual Safety Car period, caused by Romain Grosjean, to pit and rejoin ahead of the Mercedes.
Vettel then managed to hold off a charging Hamilton before the Brit relented to settle for second behind last season's championship rival.
Hamilton expressed his confusion to see Vettel ahead of him after the pit stops played out having held a comfortable margin over the German, who ran third until the pit stops.
However, Mercedes boss Toto Wolff has claimed a software glitch masked Vettel's progress as elected for a longer first stint compared Hamilton and Raikkonen.
The Brackley operation thought it had enough of a margin over its rivals.
“It's very hard to take because we had the pace and for whatever reason, we need to find out why we lost the win,” said Wolff.
“We thought we had about three seconds margin.
“I don't know, we have to ask the computers, that's what we're doing at the moment; (finding out) whether we have a software problem somewhere we need to fix.
“I think the problem is within our systems, I think that we have a bug somewhere that told us 15 seconds (within Vettel's position) is what you need. We had 12, it should have been enough, but it wasn't.
Hamilton upped his charge in the closing stages as he tried to pass Vettel but Wolff says his driver had to button off the pursuit to save his tyres.
“I mean, he was attacking flat out, and as you can see the overtaking is pretty bad here; even the mega overtakers like Lewis couldn't make a pass and he tried hard.
“But at a certain stage he had to give up because the tyres wouldn't have made it to the end.”
While Hamilton finished second Valtteri Bottas fought his way through to eighth having started from 15th due to a gearbox change.