I think from your description you have a session variable accessible within the .go file (the handlerfunc), and wish to use it in the html file. This is relatively simple, it's just a value. Yes, passing it through ExecuteTemplate is the right approach. The session is just a cookie sent with the request to your server from the browser, it's there in the request headers.
You could set a func in your set of funcs for the template which accessed some sort of global variable, but then you'd get into problems with syncing across goroutines (every request handler runs in a goroutine), so the simpler approach is best.
You should not be trying to perform operations on the session in a template like decrypting it and extracting a user id - this is more suited to your handlers and far more secure there and not in the template.
First extract it from the cookie using your preferred library (you are encrypting your sessions right?), then add it to the view context (let's say you use a map of values).
// use a lib like gorilla sessions
session, err := store.Get(r, "session-name")
userID := session.Get("user")
// store data (here in a map[string]interface{})
data := make(map[string]interface{})
data["userID"] = userID
// Send this data to the view
t.Execute(w, data) // Sets the . variable in templates
Then in the view, just use something like this to access the values you need:
{{ .userID }}
Alternatively yes you can just use javascript to access the session, but you'd need to know how it is encrypted, which is probably a security hole if it contains any information of value - anything js can get at your user can get at too.