・From Tōkyō and Nagoya
You have to reach Maibara Station by Shinkansen (note that some trains skip this station) first, the journey takes about two hours from Tōkyō and less than an hour from Nagoya. This part of the journey is covered by the Japan Rail Pass.
Then transfer on the following Ohmi Railway Line and get off at Taga-Taisha Station. It takes about half an hour reaching Taga-Taisha Station from Maibara Station (depending on time, you may have to change train at Takamiya or Hikone Stations could be possible).
The shrine is 10 minutes walking from the station.
・From Osaka and Kyōto
From Osaka and Kyōto you can take the JR Kyōto Line on the Maibara/Nagahama or Tsuruga direction, and get off at Hikone Station. Here you can change again on the Ohmi Railway Line and continue your journey to Taga-Taisha Station.
The route on the Ohmi Railway Line is not covered by the Japan Rail Pass.