Waterflooding often recovers little oil from carbonate reservoirs because carbonate reservoirs are usually oil-wet and fractured. Dilute surfactant solution injection into the fractures can improve oil production from the matrix by lowering the oil/water interfacial tension (IFT) and by altering the wettability of the rock to intermediate/water-wetting. A 3-D, two-phase, multicomponent, finite-difference, fully-implicit numerical simulator is developed that incorporates adsorption, phase behavior, wettability alteration, and related capillary pressure / relative permeability variations. The reliability of the simulator is established by comparing the core-scale simulation results with experimental results obtained in our laboratory. IFT reduction, wettability alteration and permeability are varied to study the sensitivity of the surfactant-aided gravity drainage to these process parameters. Wettability alteration drives the oil production at the early stage, but gravity is the major driving force afterwards. Surfactants which alter the wettability to a water-wet regime give higher recovery rates for higher IFT systems. Surfactants which cannot alter wettability give higher recovery for lower IFT systems. Extent of wettability alteration increases the rate of oil recovery. Recovery rate decreases with permeability significantly for a low tension system, but only mildly for high tension systems.