First, I'm not sure how you get to a complete failure of the German invasion. The naval part of the German invasion landed at five separate major points. Two of those (Narvik and Trondheim) were over a long enough distance they could reasonably have been intercepted by the Royal Navy. The one at Bergen would have been iffy to intercept because it was probably well within range of German land-based airpower recently shifted to Denmark. The other two landings would be very difficult to intercept because they crossed a narrow strait from Denmark that would be dominated by German air power. The Germans also landed via airborne assault a number of places.
Worst result for the Germans that doesn't involve them rolling a very unlikely number of snake-eyes: The Allies sink the expeditions to Narvik and Trondheim, and land forces in northern and central Norway, while the Germans establish themselves in the south, including Oslo.
Unless the German failures in north and central Norway butterfly away the successful German invasion of France a month later, the Allies would be forced to bring their forces home from Norway--France because of the surrender, Britain because they would need every trained soldier to stop the threatened German invasion. That would leave Norway on its own against the Germans at least through October 1940, when weather took Sea Lion completely off the table. The Norwegians were quite competent and very brave, and they would undoubtedly make the Germans pay a price, but Germany would almost certainly take the rest of the country in the summer of 1940.
Let's say the Germans do roll an unlikely series of snake-eyes and the invasion fails everywhere. If France still falls, the Germans would try again. They would have air superiority over southern Norway and only a narrow strait to cross from Denmark. Even given a lot more naval losses in the initial invasion of Norway and even given the loss of much of their airborne capacity in Holland, I suspect they could cobble together enough to take at least southern Norway in late summer of 1940, and then chew their way up the country in late 1940-early 1941. Great Britain would send token aid in the summer of 1940, and more substantial aid after October 1940 if Norway was still holding out.
That increase aid would come at the expense of North Africa, and might prevent the rout of the Italians there in late 1940. The arrival of more modern British planes and tanks in North Africa after October 1940 played a major role in that rout, especially the Matilda's, which weren't great tanks but were essentially impervious to anything the Italians had in the way of anti-tank guns. So the trade-off: help Norway or crush the Italians. I'm guessing the Brits would go for helping Norway. Where it goes from there, I don't know.