Before doing the derivation, I'd like to explain the origin of the scale factors $h_i$. We will assume throughout that our curvilinear coordinates $x_1$, $x_2$, and $x_3$ are orthogonal, i.e. that the gradients $\nabla x_1$, $\nabla x_2$, $\nabla x_3$ are orthogonal vectors. We will also assume that they are right-handed, in the sense that $\widehat{e}_1\times\widehat{e}_2=\widehat{e}_3$.
The Origin of the Scale Factors
One important difference between curvilinear coordinates $x_1,x_2,x_3$ and standard $x,y,z$ coordinates is that curvilinear coordinates do not change at unit speed. That is, if we start at a point and move in the direction of $\widehat{e}_i$, we should not expect $x_i$ to increase at unit rate.
One consequence of this is that the gradients $\nabla x_i$ of the curvilinear coordinates are not unit vectors. For $x,y,z$ coordinates, we know that
$$
\nabla x \;=\; \widehat{\imath},\qquad \nabla y \;=\; \widehat{\jmath},\qquad\text{and}\qquad \nabla z\;=\; \widehat{k}.
$$
However, for curvilinear coordinates, we get something like
$$
\nabla x_1 \;=\; \frac{1}{h_1}\widehat{e}_1,\qquad \nabla x_2 \;=\; \frac{1}{h_2}\widehat{e}_2,\qquad\text{and}\qquad \nabla x_3 \;=\; \frac{1}{h_3}\widehat{e}_3,
\tag*{(1)}$$
where $h_1$, $h_2$, and $h_3$ are scalars.
The reciprocal $1/h_i$ of each scale factor represents the rate at which $x_i$ will change if we move in the direction of $\widehat{e}_i$ at unit speed. Equivalently, you can think of $h_i$ as the speed that you have to move if you want to increase $x_i$ at unit rate. For spherical coordinates, it should be geometrically obvious that $h_1 = 1$, $h_2 = r$, and $h_3 = r\sin\theta$.
Formula for the Gradient
We can use the scale factors to give a formula for the gradient in curvilinear coordinates. If $u$ is a scalar, we know from the chain rule that
$$
\nabla u \;=\; \frac{\partial u}{\partial x_1}\nabla x_1 \,+\, \frac{\partial u}{\partial x_2}\nabla x_2 \,+\, \frac{\partial u}{\partial x_3}\nabla x_3
$$
Substituting in the formulas from (1) gives us
$$
\nabla u \;=\; \frac{1}{h_1}\frac{\partial u}{\partial x_1}\widehat{e}_1 \,+\, \frac{1}{h_2}\frac{\partial u}{\partial x_2}\widehat{e}_2 \,+\, \frac{1}{h_3}\frac{\partial u}{\partial x_3}\widehat{e}_3\tag*{(2)}
$$
This is the formula for the gradient in curvilinear coordinates.
Formula for the Curl
First, observe that the determinant formula you have given for the curl is equivalent to the following three formulas:
$$
\begin{gather*}
(\nabla\times A)\cdot\widehat{e}_1 \;=\; \frac{1}{h_2h_3}\left|\begin{matrix}\frac{\partial}{\partial x_2} & \frac{\partial}{\partial x_3} \\[8pt] h_2A_2 & h_3A_3\end{matrix}\right| \\[12pt]
(\nabla\times A)\cdot\widehat{e}_2 \;=\; \frac{1}{h_3h_1}\left|\begin{matrix}\frac{\partial}{\partial x_3} & \frac{\partial}{\partial x_1} \\[8pt] h_3A_3 & h_1A_1\end{matrix}\right| \\[12pt]
(\nabla\times A)\cdot\widehat{e}_3 \;=\; \frac{1}{h_1h_2}\left|\begin{matrix}\frac{\partial}{\partial x_1} & \frac{\partial}{\partial x_2} \\[8pt] h_1A_1 & h_2A_2\end{matrix}\right|
\end{gather*}
$$
We will prove the first of these formulas. Given any vector field $A$, we can write
$$
\begin{align*}
A \;&=\; A_1 \widehat{e}_1 \,+\, A_2 \widehat{e}_2 \,+\, A_3 \widehat{e}_3 \\[6pt]
&=\; h_1A_1\,\nabla x_1 \,+\, h_2A_2\,\nabla x_2 \,+\, h_3A_3\,\nabla x_3
\end{align*}
$$
Taking the curl gives
$$
\nabla \times A \;=\; \nabla(h_1A_1)\times (\nabla x_1) \,+\, \nabla(h_2A_2)\times(\nabla x_2) \,+\, \nabla(h_3A_3)\times(\nabla x_3)
$$
Here we have used the identity $\nabla\times(uF) = (\nabla u)\times F + u(\nabla\times F)$, as well as the fact that the curl of a gradient is zero. Applying formula (1), we get
$$
\nabla \times A \;=\; \frac{1}{h_1}\nabla(h_1A_1)\times \widehat{e}_1 \,+\, \frac{1}{h_2}\nabla(h_2A_2)\times\widehat{e}_2 \,+\, \frac{1}{h_3}\nabla(h_3A_3)\times\widehat{e}_3
$$
When we take the cross products, the $\widehat{e}_1$ component will be
$$
(\nabla \times A)\cdot\widehat{e}_1 \;=\; \frac{1}{h_3}\nabla(h_3A_3)\cdot\widehat{e}_2 \,-\, \frac{1}{h_2}\nabla(h_2A_2)\cdot\widehat{e}_3.
$$
But, by formula (2) for the gradient,
$$
\nabla(h_3A_3)\cdot\widehat{e}_2 \;=\; \frac{1}{h_2}\frac{\partial}{\partial x_2}(h_3 A_3)\qquad\text{and}\qquad\nabla(h_2A_2)\cdot\widehat{e}_3 \;=\; \frac{1}{h_3}\frac{\partial}{\partial x_3}(h_2 A_2)
$$
Therefore,
$$
\begin{align*}
(\nabla \times A)\cdot\widehat{e}_1 \;&=\; \frac{1}{h_2h_3}\frac{\partial}{\partial x_2}(h_3A_3) \,-\, \frac{1}{h_2h_3}\frac{\partial}{\partial x_3}(h_2A_2) \\[12pt]
&=\; \frac{1}{h_2h_3}\left|\begin{matrix}\frac{\partial}{\partial x_2} & \frac{\partial}{\partial x_3} \\[8pt] h_2A_2 & h_3A_3\end{matrix}\right|
\end{align*}
$$
as desired.
Best Answer
As long as $F(\mathbf{x})$ decays sufficiently fast as $\|\mathbf{x}\| \to \infty$, the vector potential $\phi$ such that $\nabla \times \phi = F$ is given by
$$\phi(\mathbf{x}) = \frac{1}{4\pi}\int_{\mathbb{R}^3} \frac{\nabla \times (\nabla f(\mathbf{y}) \times \nabla g(\mathbf{y}))}{\|\mathbf{x} - \mathbf{y} \|}\, d \mathbf{y} $$
This can be expanded further using $\nabla \times(\nabla f \times \nabla g) = f \nabla \cdot g - g \nabla \cdot f + g \cdot \nabla f - f \cdot \nabla g.$