I am wondering if you could connect a branch tailpiece. There are various versions. This could be to a new drain, or maybe a branch tailpiece could connect to whatever is left when you remove the leaking gray piece. You might have to extend the tube. I am not a plumber. This is just a topic to investigate, and not a statement that you will find a compatible piece.
You have plenty of space. I am thinking you would put in a new slip joint p-trap
Dearborn®1-1/4” Brass Tubular Branch Tailpieces with Hose & Clamp Slip Joint are manufactured with budget gauge brass for durability in tubular drain applications.
Dearborn Brass 1-1/4 in. x 8 in. Brass Tubular Branch Tailpieces with Hose and Clamp are designed for use in tubular drain applications. Available in 17, 20 or budget gauge brass. Options include Threaded