Gianluca Scamacca grabbed his third Euro goal of the campaign to rescue West Ham.
The £30m Italian blasted the Hammers ahead after an early scare and some terrible refereeing against the Danes.
Scamacca fired in a power drive from 20 yard after Maxwell Cornet won the ball and fed his strike partner. He got one in each tie against Viborg.
Silkeborg took a dream lead after just five minutes. Jasper Kusk was given the freedom of the penalty area to ping home side footed from 16 yards.
Moyes' men were back in it on 11 minutes when Cornet went down softly under Tobias Salquist. Ref Fabio Verissimo awarded a penalty to the anger of the locals, and Manuel Lanzini converted low to his left. Had VAR been in operation the decision may have been overturned.
The Portuguese official also got it wrong when disallowing a "goal" by Nicklas Helenius who headed home from a corner. Hammers keeper Alphonse Areola seemed to deliberately bump into Thordarson and collapse to the ground, winning a foul.
Craig Dawson, back from injury, nodded in Aaron Cresswell's corner for a third before half time. This was the home side's first proper European tie for 21 years. Hammers' fans were given a warm welcome, many handed free beer while queuing for their tickets.
A nervy last 15 was set up by Soren Tengstedt's goal after Jarrod Bowen lost the ball triggering a quick break. Areola saved well from Adamson to clinch the win.
Rice said: "We could have been in control but it was nervy. It was about game management. We were fluid after the first goal and moved the ball around.
"On artificial grass we have won. It was tough, slippy and the ball moved really quick on that pitch. We got the job done. The next game is tough and we want to close the group as quickly as possible."
Dawson added: "We were a bit sloppy at times. The plastic pitch is different, and they knew it better than us."
Read more
Mirror Football's top stories
Messi breaks UCL records beating Ronaldo
Pogba's brother 'in custody'
5 wildcard contenders for England squad
Man Utd emerge as Mbappe transfer option