In a similar way to the historical link between astronomy and astrology the subjects of number theory and numerology are also linked. The very early impetus for number theory was numerology. The Pythagorean school (500BC) were interested in the philosophical and mystical properties of numbers. Plato was influenced by this and mentions numerology in his works, notably The Republic (380BC). Judaism , Christianity and Islam all have elements of numerology.
Number theory itself is probably older than this and goes back almost to counting and simple arithmetic in prehistory.
In the same way as astronomy developed into a science, so did number theory.
Definition Number theory is the branch of mathematics that deals with the study of numbers, usually the integers, rational numbers , prime numbers etc.
Definition Numerology is the study of the supposed relationship between numbers, counting and everyday life.
There is another kind of numerology that is the study of numerical coincidences. This happens a lot in physics, where a series of apparent coincidences can occur between various rations of physical constants or physical observables.
The famous example of this is Dirac’s large number hypothesis which enforces a ration between the cosmic scale and the scale of fundamental forces. Dirac’s hypothesis predicts that Newton’s constant is varying in time. There has been some work in understanding the implications of physical constants changing in time.
Although Dirac’s hypothesis is the most famous, it was Eddington and Weyl who first noticed such numerical coincidences.
The trouble is that this cannot really be called science. Physics is all about mathematical models that can be used to explain physical phenomena. Noticing numerical coincidences by itself does not really add to our understanding of nature. One would like to explain the coincidences clearly and mathematically within some theory. Generally these coincides are interesting, but it is not clear how they are fundamental. Of course, this is apart from those that are really just due to our choices in units etc.
Number theory also has some intersection with physics. Recently there has been some considerable crossover between arithmetic and algebraic geometry and string theory (via modular forms largely). I will have to postpone talking about this.