GRRM has described it as a miraculous event. I think it is a combination of extrapolating from her own actions (she puts the dragon eggs in the brazier in Dany VI, but it’s not hot enough), her dreams (the refrain of “wake the dragon” and at one point Rhaegar stands over the eggs in the brazier, in Dany IX), what she learns from Mirri Maz Duur.
But as to why she’s so certain, I definitely think it’s a Dreamer situation, she’s having prophetic dreams throughout.