I'm in the "Hamilton would have got Rosberg anyway without the gearbox problem" camp.
Rosberg's fastest lap - 1’38.091 - on lap 26.
Hamilton's fastest lap - 1’37.176 - also on lap 26.
For reference, Hamilton then overtook Rosberg on lap 29 with the gearbox failure. Given that he'd just set his own fastest lap, Rosberg's gearbox problem can't have been that bad whilst it was 'developing' before the failure.
While I think Hamilton would have gotten Rosberg anyway because he was just faster, the logic there doesn't mean much. He reported a problem earlier, even with a problem, if the problem remains the same over time then the car is still faster lap after lap as fuel goes and newer tires are on.
Until his gears actually went who knows how much time he was losing. He could have been losing half say 1/4 of a second a lap, if it was for 10 laps then you'd be faster overall in the last lap than the lap before the problem existed. It's also possible that due to Hamilton gaining so fast he simply turned his engine mode up and decided that spending fuel to maintain the gap at that point was the right thing to do. Being at his fastest the lap before can be explained many different ways even if he was losing time.
It's basically impossible to know how much time Hamilton was gaining on him per lap purely down to being faster on the track, I would suggest enough of it was just Hamilton that over the course of what, 25 laps or so that he could gain and pass him.
Put it this way, Rosberg has failed to beat Hamilton on track when he was behind him, Hamilton has won races when starting behind Rosberg, passing him in races to take wins. The on track fights are significantly in Hamilton's favour, with only a couple times Rosberg fending him off, once at Monaco, where a caterham could fend off a top car pretty easily, and once at Canada, where he required things like missing chicanes and dead brakes to stay ahead, Hamilton still got him out of the pit(due to in general being noticeably faster throughout) but his brakes failing ended it for him.
Hamilton has caught Rosberg pretty easily at every race where there wasn't some huge disadvantage, the only times he hasn't gotten by him is tracks which don't suit overtaking at all. The only time Rosberg has gotten by Hamilton is due to a Hamilton failure and the only track he's caught him from behind was when a safety car screwed hamilton and put them on slow vs hard tire and Rosberg still couldn't get by him.