Low or high blood pressure can cause headaches. If I take nitrates, the sudden drop in blood pressure causes a real throbbing head pain which lasts for anywhere between 30 mins and several hours. There are many reasons for blood pressure variations and are not heart related, but of course if your heart is not able to pump sufficiently to keep the pressure up, then you will suffer symptoms. However, I think you would suffer more symptoms than just headaches. Even something as simple as not drinking enough fluids can cause your blood pressure to drop.
There is also a small muscle at the base of the skull, at the back which, when it goes into spasm, can cause some blinding headaches. Mine went into spasm about six years ago and my headaches were that bad I was holding bags of frozen peas on my head. It took an injection of a muscle relaxant to cure it. I would go back to your doctor for a good check up.
Yes, head ache can be caused by heart problems. I may not have this exactly right but share to get the discussion going.
I think low blood pressure can cause dizziness, but not headaches, and high blood pressure can cause headaches but not dizziness. I went through the two-sided "drill" just to say what I understand about blood pressure. You may want to measure you BP often, say every time you pass one of the public BP stations at a pharmacy (including Walmart). This would be especially important if you were also having a sudden headache at the time of the measurement.
Just on possibility.
Good luck,