Stefan Kiessling gave Leverkusen the lead in the 40th minute but Adam Szalai equalised for Mainz in the 58th minute and Marcel Risse pushed them 2-1 ahead after 76 minutes.
But Castro picked up the equaliser for Leverkusen in the 87th minute to earn them their 12th point of the season, while Mainz moved to 11.
Leverkusen missed two chances early on as Mainz keeper Christian Wetklo made a good save from Michal Kadlec's attempt in the 10th minute and Kiessling could not connect cleanly with Karim Bellarabi's cross a minute later.
Leverkusen went close yet again after 27 minutes but Andre Schurrle could not beat Wetklo one on one.
Mainz finally threatened the Leverkusen goal in the 33rd minute but Andreas Ivanschitz's drive went inches wide of the right post.
The hosts went ahead two minutes before the break as Daniel Carvajal looped a pass from the right side over a Mainz defender to Kiessling, whose header barely crossed the line before Wetklo could stop it.
Mainz equalised after 58 minutes with Zdenek Pospech sending a long diagonal ball from the right wing into the box where Szalai artistically volleyed past Leverkusen keeper Bernd Leno.
Mainz grabbed the lead with 14 minutes to play as Carvajal lost the ball in defence and Szalai passed ahead to Risse, who finished first-time into the bottom left corner to make it 2-1.
But Leverkusen rescued at least a point with the equaliser in the 87th minute. The unlucky Wetklo made a great save from Kiessling and got back up into position but could not stop Castro's fierce follow-up just inside the far left post.