It is SO frustrating when this happens and you will be surprised as to how many people have this happen to them as well. We are all not alone in this. It is nothing to be embarrassed about, it just happens; the mind is mystery in all it tries to do when we are speaking, processing, and planning what we are going to say. It is the ultimate in multitasking and is surprising it does not happen more often.
I simply will apologize, telling them I just lost my train of thought, and ask them, "What was I just saying?" It is surprising how many people can relate to this and are very helpful in reminding you where you were so you can continue.
However, if even after being reminded and you don't remember where you are going, laugh it off, just saying, "It must be one of those days, I just don't know where I was going with that," and change the subject, going off onto something else or ask them something, to give them time to respond and catch your breath and thoughts again.