It could be an arterial aneurysm
which is nothing but a sac like enlargement of a blood vessel. Sometimes when you have one of these outside your head, you might also have some of them inside your head, which is in your brain.
It could give rise to headache when it presses on your brain. The real problem comes when these sacs burst and bleed inside your brain which can be very dangerous, obviously.
In your case the headache might be a ordinary headache and may not be related to any of these. But to be on the safer side, it is best that you have a physician evaluation with an MRI