Yes, you can use Great Weapon Master on an opportunity attack
Great Weapon Master says:
when you score a critical hit with a melee weapon
and
Before you make a melee attack with a heavy weapon that you are proficient with
As you say, making an opportunity attack is still an attack.
To make the opportunity attack, you use your reaction to make one melee attack against the provoking creature.
As long as you make the opportunity attack with a melee weapon that meets the qualifications, there is no reason why it would not apply to the opportunity attack.
You may have been thinking that this was not possible because the barbarian was not taking the Attack action, but none of the abilities require an Attack action just a melee weapon attack. For more on that difference see this Q&A.
Side note: reactions can be taken on your turn
Your say:
he can't use Reckless Attack during a reaction, since it specifically says "on your turn."
But that is not actually correct.
There is no rule that says reactions must be taken outside of your turn.
Jeremy Crawford has also clarified this:
It is indeed possible to take a reaction on your own turn. Your reaction resets at the start of your turn. #DnD
https://t.co/EJbIbCefyw
Reckless Attack says:
When you make your first attack on your turn, you can decide to attack recklessly.
So you actually can, in rare cases, use Reckless Attack on an attack made as a reaction, since reactions can be used on your turn. All other conditions of Reckless Attack must still be met of course.
Barbarian example
@Prof. Bear makes a good point when pointing out that higher level barbarians could do this consistently under certain conditions:
In the case of a level 14+ Berserker Barbarian hitting a target that causes damage to them on hit, they could then make use of the Retaliation feature to immediately use their reaction for another attack, which could be both Reckless and Great Weapon Master.