Trailing 3-2 with 5 1/2 minutes remaining, Minnesota defenseman Marco Scandella launched a shot from the point that Matt Cullen tipped past Thomas Greiss and into the San Jose net for the equalizer.
Only 74 seconds later, Ortmeyer deflected a blast by Wild defenseman Jared Spurgeon, notching his first goal since 2009-10 when he was a member of the Sharks.
Cal Clutterbuck added an unassisted tally and Nick Shultz also scored as Minnesota beat San Jose for a third straight time and kept its playoff hopes alive.
The Wild are five points out of the eighth and final Western Conference playoff seed.
San Jose, meanwhile, wrapped up a nine-game road trip with its eighth loss in 12 contests.