Your approach doesn't work. Presumably, you want to define the probability of a path to be the product of the probabilities on its edges. It sounds like you want to define the weight $w(e)$ on an edge $e$ to be $w(e)=1-p(e)$ (one minus its probability). However, doesn't work. It doesn't do what you want: you want $w(e)+w(e')$ to correspond to $p(e) \times p(e')$, but it doesn't.
Instead, you should be taking logarithms. In particular, you should define the weight on edge $e$ by $w(e) = -\log p(e)$. Now addition of weights corresponds to multiplication of probabilities:
$$w(e) + w(e') = -(\log p(e) + \log p(e')) = - \log(p(e) \times p(e')),$$
as desired. At this point all of the weights in $G'$ will be non-negative (do you see why?), so you can use Dijkstra's algorithm to find the shortest path in $G'$, and that will correspond to the path in $G$ with highest probability. As you can see, this is not a longest-path problem at all; it is just a straightforward shortest-paths problem.
The trick of taking logs to turn multiplication into addition is a standard one, including in many applications of graphs, so this is worth knowing.