First, you can assume $Q$ is symmetric, as otherwise you can convert the problem to one that does contain a symmetric matrix via $P = \frac{1}{2}(Q + Q^T)$. It's not hard to show that $P$ is symmetric and satisfies $x^T P x = x^T Q x$ for all $x$.
Vanderbei's Linear Programming: Foundations and Extensions proves that $Q$ being positive semidefinite is a sufficient condition for no duality gap. (See pp. 378-379 in the first edition.)
Bazaraa, Sherali, and Shetty's Nonlinear Programming: Theory and Algorithms shows that, for general nonlinear programming, the existence of a saddle point for the Lagrangian function is a necessary and sufficient condition for no duality gap. (See Theorem 6.2.5, pp. 269-270, third edition.) So obviously that gives a necessary and sufficient condition for quadratic programming as well. Perhaps there's a way to simplify the theorem about a saddle point to the special case of quadratic programming, but I don't see how to do it right now. (Added: There doesn't seem to be a known useful way to do that. See next paragraph.)
Added: For the nonconvex case ($Q$ is not positive semidefinite), finding useful sufficient conditions for no duality gap appears to be an ongoing research problem. For example, see "On the zero duality gap in nonconvex quadratic programming problems," by Zheng, Sun, Li, and Xu (Journal of Global Optimization, 2011, DOI: 10.1007/s10898-011-9660-y), particularly the introduction, where they give an overview of results on conditions for no duality gap, including some necessary and sufficient conditions for certain special cases of quadratic programming - but none, as far as I can tell, in the general case.