The home side needed a win to stand any chance of progressing through to the semi-finals, but a late Miles Normandale try saw their hopes ended in dramatic fashion.
© Getty Images
The hosts made a quick start to the match and were ahead inside 10 minutes courtesy of a well-worked try that eventually saw William Helu go over for the opening score.
Their blistering start continued and they doubled their lead shortly afterwards when their forwards dominated a scrum, heaving it over the line and forcing a penalty try to make it 14-0.
Rhys Patchell had a chance to reduce the deficit with a kick at goal, but his miss was punished just three minutes later as Wasps claimed their third try of the match.
Again it came through the forwards, who set up a maul from a lineout which allowed Thomas Young to touch down.
Cardiff finally began to get themselves into the match after 25 minutes and enjoyed a 10-minute spell on top that saw both Macauley Cook and Lewis Jones go over in quick succession to cut the hosts' lead back to seven.
Wasps responded, however, as Tom Lindsay combined with Ruaridh Jackson to help set up Sailosi Tagicakibau, who managed to hold onto the ball with one hand for the score, clinching a bonus point for his side.
Patchell knocked over a penalty two minutes before the end of an action-packed first half, but there was still time for a fifth home try and a second for Young following another driving maul.
Wasps picked up where they left off at the start of the second half, taking a 42-17 lead courtesy of a solo effort from Guy Thompson, who burst through the line before driving over.
Again the visitors looked to launch a comeback, and Normandale got the wheels in motion when he went over from close range following some patient build-up play.
Lucas Gonzalez Amorosino clinched a bonus point for the Blues when he went in under the posts shortly after, while Seb Davies completed a spell of three tries in just 10 minutes for his side to reduce the deficit to four points.
Cardiff piled the pressure on in the closing stages and finally completed their improbable recovery when Normandale went over for his second score of the day, ensuring that the Blues are in pole position to reach the semi-finals from Pool Two.