hmmm… That's an interesting one but I would have said no because of the following:
Gloin has the text : While you control at least 5 Dwarf characters, Gloin gains: "Response: After you play Gloin from your hand, choose a hero. Add 2 resources to that hero's resource pool."
The important part for me is 'After you play Gloin from your hand'. What I'm trying to get at is that if he is played as Dwarf No. 5, he doesn't gain the response until he's in play. Therefore it follows that the text After you play Gloin from your hand' doesn't take effect because when the response became active, Gloin was already in play and you hadn't just 'played him from your hand' as such. I hope people understand what I'm trying to get at… this is just my interpretation that's all. I've tried to simplify what I mean below:
1. You control 4 Dwarves and have Gloin in your hand, so he does not have the response at the moment.
2. You play Gloin - this is the moment the response would trigger if you already had 5 dwarves in play as you have just 'played Gloin from your hand' Remember a response is a 'triggered' effect. However, you only controlled 4 dwarves at the time you played him.
3. You now control 5 dwarves so Gloin gains the response. However, you have lost the window in which to trigger it so you don't get the resources.
Like I said, this is just how I think of it but an official clairification would be handy!