Victor Piturca's side started the final round of qualifiers behind second-placed Turkey on goal difference, but they got the two results they needed on Tuesday evening to claim the runners-up berth.
In their match, Marica's first-half penalty and 81st-minute header earned Romania an expected win over second-bottom Estonia, and they also got the helping hand they had been hoping for from group winners the Netherlands, who beat Turkey in Istanbul.
Estonia's chances of getting into the top two had long since evaporated but they were clearly not going to gift Romania the three points and almost took a 23rd-minute lead when Tarmo Kink's long-range effort drew a brilliant save out of Ciprian Tatarusanu.
That let-off appeared to spark Romania into life and they went close themselves soon after through Bogdan Stancu before getting their noses in front in the 31st minute. Stancu was fouled by Mikk Reintam inside the area and Getafe striker Marica slammed home the resulting penalty to make it 1-0.
Romania looked to increase their advantage before the break and Marica was only denied a second goal by a superb save by Sergei Pareiko, who tipped his shot around the post.
Pareiko denied Romania again in the second half with a fine save to push wide Gheorghe Grozav's 76th-minute volley, and at that stage the nerves might have been starting to build in Bucharest.
However, five minutes later Marica eased the tension when he headed home Alexandru Matel's cross and, with Turkey going down to the Netherlands, Romania could celebrate claiming second spot when the full-time whistle blew.