The defending five-time world champion made a dazzling start from second on the grid to draw level with Bottas, but said he "basically, gave it to him" as the pair duelled for the lead on the first lap.
Bottas' win lifted him one point clear of Hamilton in the drivers’ championship thanks to his fastest lap at the season-opening Australian Grand Prix.
Hamilton finished second after what he described him as an "under-par" performance through the Baku weekend.
"It's not our strongest race in the season and this has always been a bit of a difficult race for me," he said. "I just struggle here. There's certain races I struggle at, compared to others. I can't really work it out. Here, I got quicker at the end, but it was too late by then. I would say it was a bit of an under-par performance from myself so I just need to work hard."
Bottas' victory helped him erase memories of last year's race where he led until a puncture three laps from the finish.
Hamilton was happy for his team-mate.
"He did an exceptional job this weekend and truly deserved his win," he said. "I just didn't get the job done in qualifying. He did. And in the race, I was too friendly at Turn One and basically I gave it to him. He drove a fantastic race, made no mistakes and deserved the win."
Bottas was modest, but exuded determination, after his victory.
"It was actually a tough race even though there was not that much happening at the front. Lewis was putting me under pressure all the time so I couldn't do any mistakes. But, honestly, everything was under control, so I was very happy to see the chequered flag."
He added: "Two wins in four races is a lot better for me than last year so I am feeling good about that. It's a great start by the team."
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ