After the goal, the Danes pushed forward and tested goalkeeper Gianluigi Buffon several times, and Christian Eriksen's shot just missed the target in the 38th.
Bendtner finally provided the equalizer in the 45th with a downward header that bounced past Buffon and into the net. He scored a similar goal in the 79th to put Denmark ahead, and was then booked for taking his shirt off while celebrating.
Bendtner had been suspended from the national side for six months for a drunk driving incident.
The Danes kept pressing and hit the post twice in the second half, but Aquilani's late goal ruined the Danes' hopes of taking control of second place in the group.
"It was quite a blow, we were close, it hurts," midfielder William Kvist said.
Italy has already secured top spot in the group.
Bulgaria was reduced to nine men in Armenia when Nikolay Bodurov was sent off in the 45th and Svetoslav Dyakov earned a second booking in the 63rd. Yura Movsisyan then netted the winner for Armenia in the 87th.
Bulgaria plays the Czech Republic on Tuesday while Denmark hosts Malta in the final round, which will decide which team enters the playoff for a spot in Brazil.
In Friday's third Group B game, the Czechs routed minnow Malta 4-1