From my answer to Colors and legend in groupplots/barplot:
In order to colour each bar differently (...) each bar needs to be handled as its own plot, i.e. it needs its own \addplot ... command. Fortunately, you don't have to write \addplot ... four times, but instead you can use \pgfplotsinvokeforeach {0,...,3} { \addplot ... }.
I would suggest you provide the data in a table, either in an external datafile or in a macro created using \pgfplotstableread. This makes it easier to loop over the data, and it makes your data more maintainable (the coordinate syntax becomes quite tedious for larger datasets).
Also, instead of using symbolic coordinates, I usually find it easier to plot the values using \coordindex and create the labels using yticklabels from table.

\documentclass{article}
\usepackage{pgfplots, pgfplotstable}
\begin{document}
\pgfplotsset{
select row/.style={
x filter/.code={\ifnum\coordindex=#1\else\def\pgfmathresult{}\fi}
}
}
\pgfplotstableread[header=false]{
1 A
7 B
5 C
2 D
}\datatable
\begin{tikzpicture}
\begin{axis}[
title=Title,
xbar, bar shift=0pt,
enlarge y limits=0.2,
xmin=0,
ytick={0,...,4},
yticklabels from table={\datatable}{1},
xmajorgrids = true,
bar width=6mm,
width=12cm, height=5.5cm,
xlabel={\#number},
nodes near coords, nodes near coords align={horizontal},
]
\pgfplotsinvokeforeach{0,...,4}{
\addplot table [select row=#1, y expr=#1] {\datatable};
}
\end{axis}
\end{tikzpicture}
\end{document}