The Goat Farm is a designated mountain bike park, catering for all kinds of disciplines and skill levels. There are a couple of proper (though short) downhill tracks, cross country trails, a skills park and even a 4X track too.
The views of Perth are a winner, but there's precious little shade, so evenings or mornings are the best option should you be riding there in the hotter months.
It's within easy ride of Midland train station too, should you not want to drive there.
Download the trail map here: http://www.wamba.org.au/maps/Goat_Farm_Map.pdf