One of challenging issues on stability analysis of time-delay systems is how to obtain a stability criterion from a matrix-valued polynomial on a time-varying delay. The first contribution of this paper is to establish a necessary and sufficient condition on a matrix-valued polynomial inequality over a certain closed interval. The degree of such a matrix-valued polynomial can be an arbitrary finite positive integer. The second contribution of this paper is to introduce a novel Lyapunov-Krasovskii functional, which includes a cubic polynomial on a time-varying delay, in stability analysis of time-delay systems. Based on the novel Lyapunov-Krasovskii functional and the necessary and sufficient condition on matrix-valued polynomial inequalities, two stability criteria are derived for two cases of the time-varying delay. A well-studied numerical example is given to show that the proposed stability criteria are of less conservativeness than some existing ones.