How can I prove that the head of the lab did not have contribution to my work? I performed part of my PhD thesis in a lab outside my university. After deciding to publish the result, the head of the lab did not give me the permission to publish it. He wanted to be the coauthor, himself and one of his students. But they did not have substantial contribution to the project. They allowed me to use their lab and their materials. he blocked my work totally. I do not have permission to publish the results just because I do not want to give credit to them since they did not contribute to my work. According to ICJME, technical help does not make eligibility to be the coauthor. Their lab knew these standards and accept them. However, the problem is that I cannot prove that their help was not that much to make them eligible to be coauthors. Even my supervisor believes that I should consider them as coauthors because he thinks that they helped me during my stay in their lab. Also, he thinks, like many other people, that it is a custom to consider the head of the lab as a coauthor.  Does anyone have suggestions for me? How can I unblock my work?
Sorry, I don't think you can do much at this point. These things should be negotiated before any resources are shared. Nothing is free, and different people may expect different forms of gratification- reciprocation, acknowledgement, authorship. You are entitled to having your opinions about this, and the correct time to voice them is at the beginning of the labwork/collaboration.

It is possible that your advisor has a prior understanding with this lab that you are not aware of. If this is not so, share your misgivings with your advisor and seek to learn his/her reasons for conceding authorship. With that knowledge, you can avoid such a situation next time. 

This time, 'unblock' by giving credit.