Gauge transformation for Bloch waves? I have seen in many places saying a gauge transformation transform the Bloch wave function as $\psi_{nk}\to e^{-i\phi_n(k)}\psi_{nk}$. However I don't quite understand how it is related to the "gauge transformation". 
When we study the gauge transformation in quantum mechanics, the wave function change by a phase factor which is a function of coordinates, but here it is a function of $k$.
Additional concern: 


*

*does $\phi_n(k)$ depend only on $k$ or also on $r$? 

*are $\phi_n(k)$ same or different for different $n$?
 A: very good question let's see what is gauge transformation
for example if i have some state $|a>$ and I also relabel it as $|b>$ such that $|a>=|b>$.
so they are absolutely same physical states but we just have two different labels for them as $a$ and $b$.
now if you think a hamiltonian for example if we have a system with a hamiltonian, $$H=\frac{p^2}{2m}+
V\cos(2\pi x /\ell)$$ with open boundary conditions where $\ell$ is some parameter
than $|x>$ and $|x+\ell>$ are wo distinc states.
however, if we have a periodic boundary condition then such that system lives in a circle with length $\ell$
$$|x>=|x+\ell>$$ they would be the exactly same physical state. We can define a translation operator $T_\ell$ such that $T_\ell|x>=|x+\ell>$.
now in a first case $T_\ell$ is a symmetry operation it changes $|x>$ to $|x+\ell>$  with same physical properties.
in the second case, $T_\ell$ is a gauge transformation it changes $|x>$ to $|x+\ell>$  and $|x>=|x+\ell>$ so in the second case, it is just relabeling of the exactly same state.  that's the spirit behind gauge transformation.
there can be many different kinds of gauge transformations in physics and all of this actually really hidden in the meaning of term gauge it is defined as according to oxford dictionary 
gauge: noun  an instrument that measures and gives a visual display of the amount, level, or contents of something.
so it is just a label and you are transforming the label.
for example $\vec{\nabla}\times\vec{A}=\vec{B}$ where $A$ is electromagnetic potential $A$ is not something physical yet $B$ is I can gauge transform  $A$ as $A\rightarrow A+\nabla f$ and it would give  exactly same $B$ so the same physical  state $B$ can be described by infinite number of different $A$ we can use infinite number of different labels for same $B$. so that's also a gauge structure.
Now finally to your question also wave function is not physical but the square of its magnitude has a physical meaning. $|\psi|^2$ is something physical yet $\psi$ is not and thus you can do a gauge transformation you use a different label that gives the exactly same physical state as $\psi e^{i\phi}$ this will also give exactly same state. in your case also it absolutely does not matter whether it depends on  $k$ because it will give the same square magnitude and same energy.
thus as a takeaway message gauge transformation are the transformation that transforms your state to the same physical state.
on the other hand, symmetries transform your state to a different state with the same physical properties. 
gauge transformations do not change any observable and leaves the inner product of untransformed and transformed state unchanged.
symmetry also may not change observable, however, the inner product between initial and transformed state will be zero.
more intuitively, gauge transformation is changing the name of your girlfriend it won't change any physical thing about her you only gauge transformed her.
symmetry is, starting to date with an identical twin of your girlfriend, they have the same physical properties but they are different people you now made an exchange transformation to your girlfriend. 
