Simon Shaw turned over possession in the maul, sparking a glorious move with the ball taken up by Joe Worsley before going wide for Cipriani, Waters and Dominic Waldouck to put Sackey over.
And despite a few nervous moments, it was left to Malik to seal victory, smashing the ball for six with three balls to go before sparking scenes of celebrations amongst his teammates.
Bath went for the victory but a spilled ball in midfield led to referee Wayne Barnes blowing the final whistle, sparking wild celebrations among the Gloucester supporters.