Samardžić settled a tense contest in the sixth minute of stoppage time, curling a shot from more than 30 metres past Łukasz Skorupski to spare Atalanta's blushes after a below-par performance at the New Balance Arena.
The win, Atalanta's second in a row, moved them level on six points with Serie A's early pace-setters, while Bologna remain without a point after two matches.
Head coach Maurizio Sarri fielded questions on his new captain before turning to the performance itself.
"It's right that Ederson is captain. Pašalić could obviously wear it too, but we decided this way. As for the match, we need to improve a lot despite the three points," he told reporters.
Sarri acknowledged the physical toll of a congested fixture list.
"Tactically we played a defensive match in which we also suffered. It's true that four games in 11 days can cloud your judgement, but I want the team to be aware that we can improve," he said, before turning to his goalkeeper.
"Carnesecchi is a keeper of the highest level and he's very strong. He's doing brilliantly, but even having conceded only one goal, the defensive phase worries me a lot. Either we press as a team or we sit back — right now we're stuck in between, and we have to improve."
Asked about reported transfer target Jonathan Rowe and the impact of his bench, Sarri kept his focus on the game itself.
"I don't know if the Rowe deal is official — I've been thinking about the match, not the transfer market," he said. "Aside from Samardžić, the other substitutes gave us a big hand. We were a bit flat out wide, but the changes helped us."
For Bologna, head coach Domenico Tedesco was left to reflect on a cruel finish.
"It's hard to take, especially because of how that final goal came about. Tonight, like against Lazio, we played well for long spells — 80 good minutes, even accounting for the fatigue," he said. "It's incredible to be on zero points after performances like these."
Tedesco pointed to a lack of composure in the final third as the difference.
"I think the priority has to be clarity in decision-making, especially near goal. We train hard for exactly that — you get there and you need the ruthlessness to score. 180 minutes like that and no goals to show for it is a heavy blow," he said.
Reflecting on facing Sarri's Atalanta, Tedesco noted how the club had evolved since his own playing career.
"First of all, the style has changed — under Gasperini it was man-to-man marking and we struggled a lot against that at the time. They remain a strong team with a great club behind them," he said, also praising debutant full-back Rahim Alhassane: "Alhassane has always been a full-back and he had a great game. I'm genuinely pleased for him."
