How close? This really comes down to what each manufacturer offers. Some will make their gravel frames/forks different than their road offerings to give better performance and rider experience in their designated realm. There is at least one of the "big three" manufacturers who offer an identical frame/fork on at least one of their higher-end road and gravel tiers (a cycling acquaintance has gone this route and purchased an additional wheelset that they simply swap to convert the bike to gravel or road use, so they do exist).
Swapping a fork seems like a moderately involved task to just convert the bike between road/gravel, especially if one does this often. It can be done, but depending on brake routing and other metrics, it could be much more of a hassle. That said, it probably is not worth the effort.
A gravel bike on tarmac can be about 5% slower in my experience, maybe a little more in some situations. Tires and air pressure are the major factors to this difference, and when inflated to the optimum pressure for the road conditions you are anticipating, most gravel bikes are not too far off the speed of a pure road machine.
Most road bikes can handle gravel quite well. To consider an extreme case, the pros racing Paris Roubaix every year (and other spring classics) ride through patches of pave' that are well beyond the average gravel path/road and they do it on road bikes. The key is again tires, and a wider tire, optimally inflated, will do well for a road bike on most gravel when the need arises. Thin road tires on gravel will be more of a headache but will usually survive, as long as the gravel is not severely rough/coarse.
I have done imperial centuries on both gravel and road bikes, and although the gravel bike was a touch slower, it was more comfortable to ride (41mm tires offered a little more cushion vs. 28mm tires).