Why was there a gap in the number of asteroid detections between 1807 and 1845? The first asteroid, Ceres, was discovered in 1801, although it wasn't called an asteroid yet.  Pallas, Juno and Vesta were discovered shortly after. Then no new asteroids were discovered for 38 years, until Astraea in 1845 when the rate of discovery picked up again, with the 10th asteroid (Hygiea) discovered in 1849.
Why was there such a decrease in new discoveries after the first four asteroids were discovered? And why did it pick up again a few decades later?
Was there a technological advance in the 1840s that made it possible to observe asteroids that were un-observable in the 1810s? Was the drop due to a decrease of interest in the astronomical community for objects between Mars and Jupiter? Did astronomers think they had found them all and stopped searching?
Ceres, Pallas, Juno and Vesta were all discovered between 1801 and 1807. After that, astronomers looked in vain for 38 years until the 5th, Astraea was spotted on December 8, 1845 by German amateur astronomer Karl L. Hencke by accident. He stumbled on Astraea while looking for Vesta one night.
So, what took so long to discover Astrea? There is a paper1 which discusses 4 possibilities:

Astronomers believed that there should be only four asteroids and thus didn't bother to look anymore. This conception came from Biblical theories and ideas.
Astronomers decided to postpone search for asteroids because of inadequacy of good charts and instruments.
Asteroids that were discovered later were not that bright as compared to the four asteroids that were discovered earlier. So, they had to wait for good telescopes to be able to see them.
Political unrest in Europe during that time. So, no one was that invested in astronomy.

The paper concluded that points (1) and (2) are more important and relevant and points (3) and (4) were met with speculation/contradictions. Refer to the paper for more details.
Reference:

Only the first four asteroids, Hughes, D. W.,1997, Journal of the British Astronomical Association, vol.107, no.4, p.211- 213. (link)