General Mathematical Result
If you can evaluate the Laplace transform via saddle point method you will get a Legendre transform from a Laplace Transformation. This means the function your transforming should have a significant peak only at one point:
As you can see, the Laplace transformation doesn't necessarily get you a Legendre transformation in the exponential:
$\int f(x)e^{-xs}=\int e^{ln(f(x))-xs}$ here $s$ isn't guaranteed to be $\frac{d}{dx}ln(f(x))$ but if f(x) is peaked at one point you can apply the saddle point approximation. In the saddle point approximation you evaluate the integral at the point where the integrand is maximum:
$\frac{d}{dx}[ln(f(x))-xs]|_{x_0}=\frac{d}{dx}ln(f(x))|_{x_0}-s=0$ which implies $\frac{d}{dx}ln(f(x))|_{x_0}=s$
so the evaluation of that integral is $e^{ln(f(x_0))-x_0s}$ where $x_0$ and $s$ have the usual relationship for a Legendre transformation.
Aplication in physics
Of course in physics you want all your thermodynamic potentials to have the have minimum peaks(- sign in $Z=e^{-F\beta}$) so your system settles down into a single well defined state. In this way all the partition functions for the different ensembles can be found by Laplace transformation and you will get the corresponding Legendre transformed thermodynamic potential.
I suggest you read this article which demonstrates this result for the micro-canonical to canonical and gives a very good review of the Legendre transformation. Then from there it is easy to go gibs or grand(which is really just gibs when you consider $\mu$ a force):
So starting from $Z = \int e^{-\beta H}$ you need to add energy from the force,$J$, you are constraining instead of its conjugate $x$: $H-> H' =H+Jx$. Then since you are now constraining $J$ instead of $x$, $x$ now parametrizes your probability and you need to integrate over it to get the correct normalization($Z$).
so $Z->Z'=\int dx \int e^{-\beta(H+Jx)}= \int dx e^{Jx}\int e^{-\beta(H)}= \int dx e^{Jx}Z$
Thus you have your Laplace transform which by following the steps above will get you the desired Legendre transform of the Helmholtz free energy; the Gibs free energy.