Galen Erso was not a regular engineer... he was a Weapons Researcher and expert in using crystals to enhance energy production. He was involved in "Project Celestial Power," where he thought he was going to be working on a vast powerplant for peaceful purposes. He got sucked in on the research until he started to get concerned with the fact that Krennic couldn't give him any examples of peaceful applications of his technology.
Catalyst explains that he escaped the Empire when it became clear his research was being weaponized; he left his notes behind confident that their complexity would cause delays and trouble as other members of the project tried to finish his work. Which they eventually figured out anyway.
Krennic wanted Galen not because he was necessary for the project's completion, but because he would be able to accomplish the project FASTER. After decades of delays in production, he needed to finish the work quickly, and Galen's knowledge of kyber crystals allowed him to accomplish the work of fusing crystals much faster than anyone else in the Tarkin Initiative could do so.
As stated in another answer, he was also useful for resolving the minor discrepancies that came up during actual building of the actual weapon and station; his deep, instinctual knowledge of his own technology would allow him to answer questions and resolve problems much, much faster than anyone else could have.
The novelization tells us that Galen was involved in resolving a problem with the hypermatter reactor; it was causing too much heat, and they had problems resolving that. They came to Galen, who realized that was the key to blowing up the station, so he designed the thermal exhaust port to back up and blow the core; he was one of the few beings around with enough intuitive understanding of the technology to realize the flaw without in-depth research. He provided Krennic multiple solutions to the problem, but all the other options would take significant resources and time. Knowing he was dragged in to speed things up, he manipulated Krennic into selecting the flawed design, and distracted everyone from looking too closely at it by providing multiple solutions they had to look at.
In the end, Galen was brought in because his experience with hypermatter reactors and kyber crystals would allow him to speed up development if only because he doesn't have to look anything up; it's all in his head. And Krennic was under extreme time pressure. Galen used that distraction to build in the flaw, thereby allowing Luke to save the galaxy with a well timed shot.