when you are pregnant, the blood volume increases but the blood cells production may not catch up with the volume increased. That's why the haemoglobin reading is reduced.
The "medicine" your dr. gave you is likely iron supplement.
no worry.. only severe anaemia will affect the foetus. Just follow dr's instruction is ok.