Could a FOSS autopilot system ever pass FAA regulations?
Short answer: technically and legally yes, a free open source autopilot could be certified.  But I think it is unlikely to happen anytime soon.

Long answer: Aircraft software certification is governed by DO-178C. There is nothing in there that says anything about whether the source is open vs closed, or free vs non-free.  What it does lay down is a lot of very rigorous requirements for proving that the software does what it says it is going to do. 

For example, for something like an autopilot, an independent testing/validation would typically be required.  That means the person who writes/codes the software and the person who tests the software have to be different people. i.e. you must have a fresh set of eyes looking at it. Further that testing will have be very extensive, covering every possible scenario your autopilot could encounter.  You might have to mock up an entire fake airplane, with simulated sensors and simulated actuators, and feed the autopilot simulated data and see if the actuators move like they are supposed to.

You also need to provide a massive amount of very careful documentation about all parts of your software process.  E.g. the software requirements need to documented, and then you need to be able to show every step of the way on how each specific requirement gets translated into the final machine code. 

An free open source project certainly could meet all of these requirements. However, they end up being very time consuming and expensive. You need an army of software engineers working all day every day for years to meet some of these requirements.  FOSS project typically do not have the level of manpower that is required to meet these requirements.