Simulating non-wetting fluid invasion in volumetric images of porous materials is of broad interest in applications as diverse as electrochemical devices and CO2 sequestration. Among available methods, image-based algorithms offer much lower computational cost compared to direct numerical simulations. Recent work has extended image-based methods to incorporate more physics such as gravity and volume-controlled invasion. The present work combines these two developments to develop an image-based invasion percolation algorithm that incorporates the effect of gravity. Additionally, the presented algorithm was developed using a priority queue algorithm to drastically reduce the computational cost of the simulation. The priority queue-based method was validated against previous image-based methods both with and without the effect of gravity, showing identical results. It was also shown that the new method provides a speedup of 20X over the previous image-based methods. Finally, comparison with experimental results at three Bond numbers showed that the model can predict the real invasion process with a high accuracy with and without gravitational effects.