At work, we have people who get 10% extra pay for training other employees, however these same people (trainers) are not certified to teach CPR to them. My boss expects me to (since I'm trained and certified to do so) teach other employees CPR, but I won't be getting extra 10% like the people who get paid to train employees.
Yes, this is almost certainly legal as long as it doesn't incur overtime.
Any onus to receive extra pay beyond legal minimums is between you and your employer, so if you want more pay you'll need to ask for it, back or your case, and be willing to use or create some leverage (threatening to quit is one example, but only if you are 100% serious).
Expect this to get closed. "Is this legal" almost always does.
Having said that, the only way I can think of that it wouldn't be legal is if you're part of a protected class (such as female or minority) and could allege that you were being paid less for discriminatory reasons.
Remember, what you make (unless there's a collective bargaining agreement) is almost always solely based on what you can get someone to pay you.
You can always try to negotiate with your boss. If he won't budge, you really only have one option if you don't want to do it but that would leave you without any job and a bad reference.