We give a geometric interpretation of Bar-Natan's universal invariant for the class of tangles in the 3-ball with four ends: we associate with such 4-ended tangles T multicurves BN(T ), that is, collections of immersed curves with local systems in the 4-punctured sphere. These multicurves are tangle invariants up to homotopy of the underlying curves and equivalence of the local systems. They satisfy a gluing theorem which recovers the reduced Bar-Natan homology of links in terms of wrapped Lagrangian Floer theory. Furthermore, we use BN(T ) to define two immersed curve invariants Kh(T ) and Kh(T ), which satisfy similar gluing theorems that recover reduced and unreduced Khovanov homology of links, respectively. As a first application, we prove that Conway mutation preserves reduced Bar-Natan homology over the field with two elements and Rasmussen's s-invariant over any field. As a second application, we give a geometric interpretation of Rozansky's categorification of the two-stranded Jones-Wenzl projector. This allows us to define a module structure on reduced Bar-Natan and Khovanov homologies of infinitely twisted knots, generalizing a result by Benheddi. Contents 1. Introduction 1 2. Algebraic preliminaries 11 3. Khovanov-theoretic invariants of links 17 4. Bar-Natan's universal cobordism category and tangle invariants 25 5. Classification results 36 6. Immersed curve invariants 56 7. Pairing theorem 61 8. The mapping class group action 71 9. Signs and mutation 79 10. Khovanov homology of infinitely twisted knots 84 References 93 AK is supported by an AMS-Simons travel grant. LW is supported by an NSERC discovery/accelerator grant and was partially supported by funding from the Simons Foundation and the Centre de Recherches Mathématiques, through the Simons-CRM scholar-in-residence program.