This would require a fully connected graph between all Departments of State around the world (i.e., the holders of their respective countries' passport DBs), and that is definitely not the case. It will also never be the case, since there are various geopolitical advantages to having a secret passport database (like being able to mint identities for spies, or deny the existence of a person).
The bar code you're referring to is just a machine-readable version of the information printed on the paper. It doesn't carry any proof of authenticity.