One of the most fascinating predictions of the theory of general relativity is the effect of gravitational lensing, the bending of light in close proximity to massive stellar objects. Recently, artificial optical materials have been proposed to study the various aspects of curved spacetimes, including light trapping and Hawking radiation. However, the development of experimental `toy' models that simulate gravitational lensing in curved spacetimes remains a challenge, especially for visible light. Here, by utilizing a microstructured optical waveguide around a microsphere, we propose to mimic curved spacetimes caused by gravity, with high precision. We experimentally demonstrate both far-field gravitational lensing effects and the critical phenomenon in close proximity to the photon sphere of astrophysical objects under hydrostatic equilibrium. The proposed microstructured waveguide can be used as an omnidirectional absorber, with potential light harvesting and microcavity applications.