For such an iconic street in Fremantle, it is a little known and odd fact that Wray Avenue wasn’t always known by this name.
The earliest name that I can find for the street is Hampton Street (I think that I have also seen it listed as Hampton Terrace on a pre-1900s map). This is different from Hampton Road (that still exists) which it crossed as it headed east away from South Terrace. I’m not sure of the origin of the name Hampton. The Hampton Buildings on the corner of Hampton Street (now Wray Avenue) and South Terrace could be the origin, although they may have been name after the street. It may also be derived from John Stephen Hampton, Governor of Western Australia from 1862-68.
The name seems to have changed to Alexander Road in the early 1900s (appearing with that name in the 1904 edition of the Western Australia Towns Directory ). I’m not sure of the origin of the name Alexander. A tailor listed as Alex (Alexander?) Doig is listed as occupying the address on the corner opposite the Hampton Buildings in the Western Australia Towns Directory. One can imagine that having Hampton Street and Hampton Road became confusing for people and a change was sought.
In the early 1920s, the name was officially changed from Alexander Road to Wray Avenue (appearing with that name in the 1923 edition of the Western Australia Towns Directory ). I have been on a tour of the Fremantle Prison where the name has been wrongly attributed to Captain H Wray who designed the gates that are still on the front of the prison. It was named after William Ernest Wray  who had been mayor of Fremantle, although he was not mayor at the time of the name change. His mother, Isabella Wray had also lived on the street at number 52 in the early 1900s. It is possible that this may have influenced the new choice of name. Tragically, William Ernest Wray committed suicide in 1928.
Since then the street has not undergone any changes, remaining Wray Avenue.
3 – http://register.heritage.wa.gov.au/PDF_Files/16%20South%20Terrace%20(P-AD).PDF