Extension of Poincaré inequality: $\|u\|_{L^2(\Omega)}\leq C\|\nabla u\|_{L^2(\Omega)}$ when $u$ vanishes in $\Gamma\subseteq\partial\Omega$. Recall Poincaré inequality:

Let $\Omega$ be a bounded open set in $\mathbb{R}^n$. Then there is a $C=C(\Omega,n)>0$ such that  $\|u\|_{L^2(\Omega)}\leq C\|\nabla u\|_{L^2(\Omega)}$ for all $u\in C_c^1(\Omega)$ (or $u\in H_0^1(\Omega)$).

I want to prove the following version:

Let $\Omega$ be a bounded connected open set in $\mathbb{R}^n$ with smooth boundary $\partial\Omega$. Let $\Gamma\subseteq\partial\Omega$ be a relatively open set. Then there is a $C=C(\Omega,n,\Gamma)>0$ such that $\|u\|_{L^2(\Omega)}\leq C\|\nabla u\|_{L^2(\Omega)}$ for all $u\in C^1(\bar{\Omega})$ with $u=0$ on $\Gamma$. 

This can be proved by contradiction and using Rellich compactness theorem in $H^1(\Omega)$. 
But I am more interested on a proof giving some idea of a possible $C$ (not necessarily the optimal one, just a $C$). Here is my attempt for a convex $\Omega$. I was not able to finish the proof. Maybe the whole idea is wrong, I do not know...
Given $z\in\Gamma$ and $\sigma\in \mathbb{S}^{n-1}$, let $g(r)=u^2(z+r\sigma)$ defined on $A_{z,\sigma}=\{r>0:\,z+r\sigma\in\Omega\}$. For all $\bar{r}\in A_{z,\sigma}$
$$ u^2(z+\bar{r}\sigma)=g(\bar{r})=\underbrace{g(0)}_{=0}+\int_0^{\bar{r}}g'(r)\,dr=2\int_0^{\bar{r}}u(z+r\sigma)\,\nabla u(z+r\sigma)\cdot\sigma\,dr.$$ Then $$u^2(z+\bar{r}\sigma)\leq 2\int_0^{\bar{r}}|u(z+r\sigma)|\,|\nabla u(z+r\sigma)|\,dr\leq 2\int_{A_{z,\sigma}}|u(z+r\sigma)|\,|\nabla u(z+r\sigma)|\,dr,$$ so 
\begin{align*}\int_{A_{z,\sigma}}u^2(z+r\sigma)\,dr \leq {} & 2|A_{z,\sigma}|\int_{A_{z,\sigma}}|u(z+r\sigma)|\,|\nabla u(z+r\sigma)|\,dr\\
\leq {} &  2\,\text{diam}(\Omega)\int_{A_{z,\sigma}}|u(z+r\sigma)|\,|\nabla u(z+r\sigma)|\,dr. \end{align*} Now use the well-known inequality $2ab\leq a^2/\epsilon+b^2\epsilon$ with $a=|u(z+r\sigma)|$, $b=|\nabla u(z+r\sigma)|$ and $\epsilon=2\,\text{diam}(\Omega)$, so that $$\int_{A_{z,\sigma}}u^2(z+r\sigma)\,dr\leq 4\,\text{diam}(\Omega)^2\int_{A_{z,\sigma}}|\nabla u(z+r\sigma)|^2\,dr.$$ Integrating on $\mathbb{S}^{n-1}$ with respect to $d\sigma$ and using $r^{n-1}\,dr\,d\sigma=dy$,
\begin{align*}\int_\Omega u^2(y)\,\frac{1}{|y-z|^{n-1}}\,dy= {} &\int_{\mathbb{S}^{n-1}}\int_{A_{z,\sigma}}u^2(z+r\sigma)\,dr\,d\sigma \\ \leq {} &  4\,\text{diam}(\Omega)^2\int_{\mathbb{S}^{n-1}}\int_{A_{z,\sigma}}|\nabla u(z+r\sigma)|^2\,dr\,d\sigma \\= {} & 4\,\text{diam}(\Omega)^2\int_\Omega |\nabla u(y)|^2\,\frac{1}{|y-z|^{n-1}}\,dy. \end{align*}
Since $|y-z|\leq \text{diam}(\Omega)$, $$\int_\Omega u^2(y)\,dy\leq 4\,\text{diam}(\Omega)^{n+1}\int_\Omega |\nabla u(y)|^2\,\frac{1}{|y-z|^{n-1}}\,dy,$$ for every $z\in\Gamma$. 
My problem: I would like to get rid of $1/|y-z|^{n-1}$. I thought of integrating on $\Gamma$ with respect to $d\sigma$ at both sides, and to bound $$\int_\Gamma \frac{1}{|y-z|^{n-1}}\,d\sigma(z).$$ If this integral were a Lebesgue integral, since $n-1<n$ we would have the boundedness of the integral. But we are dealing with a surface integral. As $\Gamma$ is relatively open and $\partial\Omega$ is smooth, there is a relatively open subset $V\subseteq\Gamma$ such that $V$ is the graph of a function $\varphi:W\subseteq\mathbb{R}^{n-1}\rightarrow\mathbb{R}$, so (denote $y=(y',y_n)$):
$$\int_V\frac{1}{|y-z|^{n-1}}\,d\sigma(z)=\int_W\frac{\sqrt{1+|\nabla \varphi(z')|^2}}{(|y'-z'|^2+|y_n-\varphi(z')|^2)^{\frac{n-1}{2}}}\,dz'\leq C\int_W \frac{1}{|y'-z'|^{n-1}}\,dz',$$ but this last integral may not be finite.
EDIT: Another (unsuccessful) attempt of proof is the following, with no need of using radius $r$ or angles $\sigma$. It uses the idea of an answer below to prove that Poincaré inequality holds when the hypothesis is that the mean of the function over the domain is $0$.
If $x\in\Omega$ and $z\in\Gamma$, then 
$$ u(x)=u(x)-u(z)=\int_0^1 \nabla u((1-t)z+tx)\,dt\cdot (x-z),$$ so $$|u(x)|\leq\text{diam}(\Omega) \int_0^1|\nabla u((1-t)z+tx)|\,dt,$$ and by Jensen's inequality $$u(x)^2\leq\text{diam}(\Omega)^2 \int_0^1|\nabla u((1-t)z+tx)|^2\,dt.$$ Integration over $\Gamma$ and $\Omega$,
\begin{align*}
\|u\|_{L^2(\Omega)}\leq {} & \frac{\text{diam}(\Omega)^2}{|\Gamma|}\int_{\Omega}\int_\Gamma\int_0^1 |\nabla u((1-t)z+tx)|^2\,dt\,d\sigma(z)\,dx \\
= {} & \frac{\text{diam}(\Omega)^2}{|\Gamma|}\bigg[\underbrace{\int_\Gamma\int_{1/2}^1\int_\Omega |\nabla u((1-t)z+tx)|^2\,dx\,dt\,d\sigma(z)}_{(I)} + \\
+ {} & \underbrace{\int_\Omega\int_{0}^{1/2}\int_\Gamma |\nabla u((1-t)z+tx)|^2\,d\sigma(z)\,dt\,dx}_{(II)}\bigg].\end{align*}
For (I), make the change $(1-t)z+tx=y$, $dx=dy/t^n$, so that $$(I)=|\Gamma|\left(\int_{1/2}^1 \frac{1}{t^n}\,dy\right)\|\nabla u\|_{L^2(\Omega)}^2\leq |\Gamma|2^n \|\nabla u\|_{L^2(\Omega)}^2.$$ For (II) one could try to do a similar thing, but I do not know how to make the change of variable in $\Gamma$.
 A: There is a similar proof in Gilbarg and Trudinger Gilbarg and Trudinger(lemmas 7.12 and 7.16 and formula (7.45). They prove Poincare inequality in convex domains with the average instead of $u=0$ on $\Gamma$.
The trick there is to consider $g(r)=u(z+r\sigma)$ instead of $u^2$, to integrate first in $z$ as you suggested, and then instead of using Holder's inequality to raise to the power $2$ to use instead a generalized form of Young's inequality for convolutions to deal with $\frac1{|x-z|^{n-1}}.$
A similar idea could work here....
A: The problem with your argument is in using the same point $z\in \Gamma$ for all rays when you integrate in polar coordinates. The Poincare inequality does not hold if $u=0$ at a single point, since the capacity of a point is zero. This is what is causing your final line to be non-integrable. Somehow you have to "share the burden" across all points $z\in \Gamma$, maybe by varying $z\in \Gamma$ as you integrate across rays. Unfortunately I don't know how to do this or if it will work out. 
As a simple example you can compute the constant for a box $[0,1]^d$ if $\Gamma = \{x_i=0\}$. If you use your method and integrate along $x_i$ (instead of in polar coordinates) you should get $C=2$. Note that you are using rays starting from all points $x \in \Gamma$ in the proof. Somehow you need to do this in your case of a convex domain as well.
EDIT: A silly idea just occurred to me. You might try sticking the point $z$ outside the domain slightly behind $\Gamma$ and use your same argument. Then the right hand side would be integrable, but the rays might not completely sweep out the domain (but if it is uniformly convex, then you might not miss too much).
