In 1902, Albert Einstein, unable to find a university teaching position after graduating, took a job as a technical clerk at the Swiss patent office in Bern, reviewing applications for mechanical inventions. It was steady work, but far from the research career he had hoped for, and he did it largely to support himself while continuing physics on the side.
Working through his patent duties efficiently enough to leave time for his own thinking, he spent his evenings and weekends developing ideas that most established physicists of the era weren't seriously pursuing, without access to a university laboratory, without academic colleagues nearby, and without much institutional recognition at all.
In 1905, still working at the patent office, he published four papers within a single year — on the photoelectric effect, Brownian motion, special relativity, and the equivalence of mass and energy — any one of which would have been a landmark achievement, and together they reshaped modern physics.
It took several more years, and a further decade of work culminating in general relativity in 1915, before the wider scientific establishment fully caught up to what a patent clerk with no laboratory and no professorship had already worked out largely in his spare time.