Defender Alexander Scholz had put the visitors ahead at the Gewiss Stadium early on and they were within 11 minutes of a first ever victory in Europe's elite club competition, but Romero's header provided some just reward for Atalanta following incessant pressure in the closing stages.
They move to eight points in the group and go to Amsterdam to face Ajax in the final round of matches next week needing only a draw to secure a place in the round of 16, with the Eredivisie side one point behind them and leaders Liverpool out of sight.
Midtjylland will finish bottom after defeats in their opening four matches of the group phase, but at least claimed a first Champions League point in their debut season after a spirited display in Bergamo.
The result continues Atalanta's unusual campaign that has seen them take two points from the nine available at home, but six from six on the road, including a famous 2-0 win at Anfield last week, which provides a good omen for their trip to Amsterdam.
Midtjylland took the lead in stunning style on 13 minutes when striker Sory Kaba chested the ball into the path of Scholz on the edge of the box and the centre back thrashed it into the top corner.
Home striker Duvan Zapata found himself in a number of promising positions, but his finishes either lacked power and direction, or were straight at Midtjylland goalkeeper Jesper Hansen in a frustrating night in front of goal.
The visitors went close to doubling their advantage in the second half when Kaba flicked the ball onto the crossbar following a corner, but Atalanta's persistence was finally rewarded as Hans Hateboer's cross was guided into the net by Romero, much to the relief of the hosts.