The referee issued a red card to Sebastian Saucedo for a studs-up challenge on Mauro Rosales in the 76th minute. The Whitecaps (5-2-1) quickly capitalized when Mattocks headed home Russell Teibert's left-footed cross 4 minutes later.
"We had never beaten them here, so I'm always up for the challenge," said Mattocks. "It's always tough to come play in Salt Lake."
It was the first goal conceded by Real Salt Lake (2-1-3) in 262 minutes.
Real Salt Lake returned to even strength when the Whitecaps' Jamison Olave was sent off for his second yellow card in the 89th minute.
Vancouver goalkeeper David Ousted had four saves in his fourth shutout of the season.
"Obviously it's a good result for us, we made some tactical adjustments prior to the game and they worked to a tee," said Whitecaps head coach Carl Robinson. "We'll take the three points."
Real Salt Lake's loss makes the New York Red Bulls the last unbeaten MLS team.