I know a little about anemia but not in connection to fasting. There can be various reasons why a person is anemic. As Chris suggested it can be an absorption problem, like pernicious anemia . It can also be a bone marrow problem and if so your hemoglobin would not rise very much even with iron tablets. It can also be AIHA (autoimmune hemolytic anemia) where an antibody in one's own immune system is autolyzing red blood cells.
Your doctor would have done a CBC (complete blood count) to determine what was causing your fatigue and then discovered your anemia was probably via your low HGB count. That test should also have your RBC (red blood cell count) and your fe studies, i.e. Iron, Transferrin and Ferritin counts and their saturation levels.
Try to get hold of that test and have another one done to compare. If the iron tablets have done the trick, it's usually just an absorption problem.