After a goalless first half at the Rio Tinto Stadium in Sandy, Utah, Dallas surged ahead just after the hour mark through Fabian Castillo.
Castillo received Ferreira's pass and after skipping past Tony Beltran, found the target with ease.
However, that lead lasted for 15 minutes as Salt Lake restored parity in the 76th minute through an Alvaro Saborio header from close range.
Then in the fourth minute of injury time Ferreira struck the second for Dallas as he shot the ball over the shoulder of Salt Lake goalkeeper Nick Rimando.
The victory means that Dallas have now stretched their unbeaten streak to four matches and have broken a six-game losing streak in Utah that dates back to 2007.