Quantum computers promise dramatic speed ups for many computational tasks. For large-scale quantum computation however, the inevitable coupling of physical qubits to the noisy environment imposes a major challenge for a real-life implementation. A scheme introduced by Gottesmann and Chuang can help to overcome this difficulty by performing universal quantum gates in a fault-tolerant manner. Here, we report a non-trivial demonstration of this architecture by performing a teleportation-based two-qubit controlled-NOT gate through linear optics with a high-fidelity six-photon interferometer. The obtained results clearly prove the involved working principles and the entangling capability of the gate. Our experiment represents an important step towards the feasibility of realistic quantum computers and could trigger many further applications in linear optics quantum information processing.