This vector potential gives a magnetic monopole field, what's wrong with it? $\mathbf{A} = \frac{g(1-\cos\theta)}{r\sin\theta} \mathbf{\hat\phi} \Rightarrow \mathbf{B} = g \mathbf{\hat r}/r^2$
But yet the existence of $\mathbf{A}$ itself hinges on the fact that there are no magnetic monopoles. Is the problem because the given $\mathbf{A}$ has singularities?
 A: Yes, you have problems with this potential due to the singularity. Notice that you do want the singularity in $r=0$, as you are talking about a point charge (and the electric potential is singular in the position of a particle).
There is also another enormous problem: you know that $\vec\nabla\cdot(\vec\nabla\times\vec A)=0$, as you are taking the gradient of a curl. Due to this fact, you cannot have magnetic charge: remember that, for a point charge at the origin, $\vec \nabla\cdot \vec E=q\delta^3(\vec x)$. That $\delta^3$ factor is what allows us to say that, in any set containing the origin, we have a total charge $q$. This does not work with the magnetic field, when we integrate in a naive way.
Those two problems are solvable, through the introduction of the concept of fiber bundles. I'll try to not use them, but know for future reference that modern gauge theory is formulated around the concept of fiber bundles, that allow you to describe things like magnetic monopoles in a correct way.
I will refer to Manton and Sutcliffe's Topological Solitons in answering. In chapter 8, they discuss magnetic monopoles.
Let's examine your potential. I assume that your azimutal coordinate $\theta$ goes from $0$ to $\pi$, as it should be the case for your potential to work. You can choose between two potentials:
$$
\vec A_+=\frac{g}{4\pi r}\frac{1-\cos\theta}{\sin\theta}\hat \phi,\quad\vec A_-=\frac{g}{4\pi r}\frac{-1-\cos\theta}{\sin\theta}\hat \phi.
$$
You can verify that both potentials have $\vec B$ as curl, whenver $r\neq 0$, $\theta\neq 0$ and $\theta\neq\pi$. The additional $4\pi$ factor is just a redefinition of $g$, that is convenient as it makes the flux of the magnetic field equal to the magnetic charge, with no proportionality constant. Which potential will we use? The answer is "both". Notice that the first potential is nonsingular in $\theta=0$ (north pole, for definiteness), while the second one is nonsingular in $\theta=\pi$ (perform the limit: it exists and is 0, so you can extend the definition in a continous way).
Let us say that you want to find the magnetic field at a given distance from the monopole, $R$. In modern language, you are looking for the magnetic field on a 2-sphere of radius $R$, that I will call $S^2_R$, under the boundary condition that the flux of this magnetic field over the whole $S^2_R$'s boundary should equal to the magnetic charge:
$$
\int_{S^2_R}\vec B\cdot d\vec S=g,
$$
where $\vec S$ is the vector pointing outwards from the sphere.
The key fact is that the sphere $S^2_R$ cannot be described by a simple set of coordinates $(\theta,\phi)$, without excluding one of the poles. In differential geometry language, you have that $S^2_R$ is not a trivial manifold, and you need at least two systems of coordinates to cover the whole sphere. Let $\theta_N$ and $\theta_S$ be angles such as $0<\theta_S<\theta_N<\pi$: you can use a system of coordinates $(\theta_+,\phi_+)$ where $0\leq\theta_+<\theta_N$ and another system of coordinates $(\theta_-,\phi_-)$, where $\theta_S<\theta_-\leq\pi$. Now, due to the fact that $\theta_S<\theta_N$, you have that those two coordinate systems cover the whole sphere, in the sense that any point is described by at least one of such sets of coordinates. When it is described by both sets (as it is the case for all points in the strip $\theta_S<\theta<\theta_N$ you must have a transition function, that associates a coordinate in a set to a coordinate in another (in this case, you just have to take the same $\theta$, but more complicated choices are possible).
A gauge theory over the sphere is (TRULY LOOSELY SPEAKING) an assignement of a gauge field $\vec A$ on any patch of the sphere. Now, we can say that $\vec A_+$ describes the potential in the $(\theta_+,\phi_+)$ system, so it extends to the north pole (where it is nonsingular). We assign the potential $\vec A_-$ to the south pole (where it is nonsingular). Now, what can we say on the overlap string? You can verify that, on the strip
$$
\vec A_-=\vec A_+-\vec\nabla\left(\frac{g}{2\pi}\phi\right).
$$
I don't need to specify $\phi_1$ or $\phi_2$, as the transition map is the identity. This is exactly a gauge transformation! Due to the fact that the fields are related by a gauge transformation, you can say that they describe the same physical field.
How does this construction solve the problem of magnetic charge? Or, is the flux condition working here? A rigorous (and quick) explanation would require notions of integration in differential geometry, so I'll go with intuitive answer. If you take $\theta_N$ and $\theta_S$ such as the equator $\theta=\frac\pi2$ is in the overlapping region, you can divide the integral as
$$
\int_{S^2_R}\vec B\cdot d\vec S=\int_{NP}\vec\nabla\times\vec A_+\cdot d\vec S+\int_{SP}\vec\nabla\times\vec A_-\cdot d\vec S.
$$
Here, $NP$ means $\theta<\frac{\pi}{2}$ and $SP$ means $\theta>\frac{\pi}{2}$. Notice that the equator does not belong to $NP$ or $SP$, but it is a line and integrals of well defined functions over that line are $0$. The equator is a boundary for both north pole and south pole, so we can use Stokes theorem: it is immediate then to be convinced that the previous integral is equal to two line integrals on the equator, taken once clockwise and the other time counterclockwise:
$$
\int_{S^2_R}\vec B\cdot d\vec S=\int_{equator}\vec A_{1}\cdot d\vec l-\int_{equator} \vec A_2\cdot d\vec l=2\pi R\left(\frac{g}{4\pi R}+\frac{g}{4\pi R}\right)=g.
$$
Mind, this is not the proper way to proceed. Take it just for intuition.
To conclude, magnetic monopoles are theorically possible, and a potential for a magnetic monopole can be written. But you have to use the notions of coordinate charts to define the potential without ambiguity, and obtain an analogous of Gauss' law for magnetism. Your potential is part of the solution. If you really are interested in gauge theories, you will have to learn a lot of differential geometry and the basic of fiber bundles to be able to do the funnier things with gauge fields.
