Bandwidth vs slew rate
To determine the maximum achievable closed loop gain at a given frequency use GBW but bear in mind that the output signal will be distorted if the frequency or output amplitude are so large that slewrate limiting comes into play.
For instance...
A 741 has a GBW of around 1MHz and so a maximum closed loop gain of 100 will be achievable at a frequency of 10kHz. Above this frequency the gain rolls off. (Actually down 3dB at 10kHz).
It's possible to determine the maximum allowable pk output amplitude at 10kHz which doesn't cause slewrate limiting using the following formula....
Vpk = Slewrate/(2 * pi * f)
The slewrate of a 741 is 0.5V/us and so the maximum allowable pk amplitude at 10kHz is 8V.
However, the same 741 configured for a closed loop gain of 10 is GBW limited to a bandwidth of 100kHz but at 100kHz the maximum possible pk amplitude which won't induce slewrate limiting is....
Slewrate/frequency = (0.5 x 10^6)/2pi100kHz = 0.8V