Purpose: Natamycin (NTM) ophthalmic suspension is the only FDA-approved formulation commercially available for treating ocular fungal infections. However, precorneal residence times and losses/drainage remain the foremost challenges associated with current ocular antifungal pharmacotherapy. In our previous investigations, NTM loaded polyethylene glycol nanolipid carriers (NTM-PNLCs) showed enhanced corneal permeation, both in vitro and in vivo. To further improve the corneal retention of NTM-PNLCs, this study aimed to develop a gelling system composed of carboxyvinyl polymer, guar gum, and boric acid in which the NTM-PNLCs were loaded. Methods: A 2 3 factorial design was employed in formulating and optimizing the gelling system for NTM-PNLCs, where the independent factors were the gelling excipients (guar gum, boric acid, and Carbopol Ò 940) and dependent variables were gelling time, gel depot collapse time, rheology, firmness, and work of adhesion. Optimized gel was evaluated for transcorneal permeation using rabbit cornea, in vitro; and tear pharmacokinetics and ocular biodistribution in male New Zealand White rabbits, in vivo. Results: Optimized NTM-PNLC-GEL was found to exhibit shear thinning rheology, adequate firmness, and spreadability, and formed a depot that did not collapse immediately. In addition, the in vitro transcorneal evaluation studies indicated that the NTM-PNLC-GEL exhibited a lower/slower flux and rate in comparison to Natacyn Ò suspension. NTM-PNLC-GEL (0.3%), at a 16-fold lower dose, exhibited mean residence time and elimination half-life comparable to Natacyn (5%), and provided similar in vivo concentrations in the innermost tissues of the eye. Conclusion: The data indicate that the NTM-PNLC-GEL formulation could serve as an alternative during ophthalmic antifungal therapy.