Download Heroic Launcher from the Discover app in Desktop mode and add it as a non-Steam game. You can log into your GOG account there. In a best-case scenario, which is more often than not, you just hit download, and you can play the game on Steam Deck.
But sometimes it doesn't work like that. Steam will often bundle dependencies with your download, like DirectX versions or Visual Studio runtimes. To get these working, you'll need to run "winetricks", which can be done on a game-by-game basis from within Heroic, and then install the dependencies you need. To find out which dependencies you need, if you had trouble launching the game in the first place, you can check SteamDB and see what other "depots" the game has. This resolves the problem about 99% of the time, if there's a problem at all. In one case, Phantom Fury, I was unable to get the same compatibility with the GOG version that I was with the Steam version, and I don't know why. Also, at this point in time, I don't think you can rely on cloud saves working, and you might need to rely on a solution like SyncThing, but it looks like cloud saves working reliably via Heroic is imminent, if it isn't already since the last time I checked.