Madalin's second-half effort condemned Ireland, managed by Noel King's number two Harry McCue, to a 1-0 defeat at the Showgrounds in Sligo.
The Republic went into the game confident of firmly establishing themselves in second place in Group 6 behind leaders and favourites Germany after recording a 0-0 draw against the Romanians on Piatra Neamt on Friday.
However, they were unable to claw themselves back into the game after Madalin's intervention and now face a battle to get themselves back into the mix.
The home side started brightly and went close to the opening goal when Frankie Sutherland tested keeper Laurentiu Branescu from distance with nine minutes gone.
They thought they had taken the lead through Sean McGinty's 19th-minute header, only for an offside flag to end his celebrations.
But Romania grew into the game and although Irish keeper Aaron McCarey saved well from Stefan Popescu, there was nothing he could do to keep out Madalin's 54th-minute effort from all of 30 yards.
Ireland might have snatched a point a minute from time when substitute Will Hayhurst got his head to Anthony Forde's free-kick, but he sent his effort tamely wide.
The win - a first in four attempts in the group - saw the Romanians leapfrog their hosts into third place.
The Republic, who have now collected only four points from as many games, have a month to stew on a missed opportunity as they prepare for the Faroe Islands' arrival and their trip to Montenegro in November.