While it isn't too apparent now Toyota has a very long history in motorsports starting with a Toyopet Crown Deluxe which had potent 48hp (not a typo). The Crown Deluxe managed to finish the Mobilgas Round Australia Rally in 1957.
Other highlights through the years include a Toyota 2000GT which somehow ran for a mind-boggling 78 hours and averaged nearly 130 mph.
It was in 1976 that TESCO, Toyota Sports Corner, became the Toyota Racing Development that we know today; you can read the full article here.
More TRD history can be found here.