Edinburgh had raced into a 14-11 half-time lead thanks to tries from wingers Tim Visser and Mark Robertson.
But fly-half Ian Keatley, who scored two penalties and a drop goal, grabbed an intercept try for the Irish province to bring them back into the game.
Flanker Roddy Grant's converted try had Edinburgh 21-19 up but Nikora coolly stroked over the telling score.
"We got our just desserts tonight," said Moffat.
"There are no complaints at all, we were very lacklustre and half-hearted, they started brightly and they should have been further ahead than they were."