There are lots of ways to fake three dimensions with two dimensional images: some crazy stuff is possible if you know what you're doing. But, this isn't real 3D. The only way to get real 3D out of a 2D medium like paint is to gradually build up a sculpture out of hundreds of layers, which is where these incredibly lifelike goldfish come from.
To make these sculptures (or whatever you're supposed to call a 3D painted picture), Japanese artist Riusuke Fukahori combines meticulously detailed artistry with buckets of clear plastic resin. Each fish is constructed from the bottom up in slices, and as each slice is completed, it's covered with clear plastic resin. The slices slowly build up into a completely three dimensional fish encased in resin that looks like water. Essentially, this is a form of analog 3D printing, and the advantage is that you end up with an object that is truly three dimensional and can be viewed from any angle. Here's a picture of a half-completed fish to give you a better sense of what's going on:
I can't imagine the amount of skill and patience it must take to make sculptures like these, but Riusuke Fukahori must have both in spades, since he's created a whole bunch of them. See a selection of his work in the gallery below, and check out the video which shows even more detail on how the fish are made.