You can use a centered version of tabularx's X column type:

\documentclass{article}
\usepackage{tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\begin{document}
\begin{table}
\caption{Caption.}
\centering
\begin{tabularx}{0.7\textwidth}{C|C|C|C|C|C}
\hline \hline
\multicolumn{2}{c|}{Long Header 1} & \multicolumn{2}{c|}{Long Header 2} & \multicolumn{2}{c}{Long Header 3} \\
\hline
A & B & A & B & A & B \\
\hline \hline
\end{tabularx}
\end{table}
\end{document}
Edit:
To make it work with different headers you have to inform tabularx that you are using \multicolumn:
\documentclass{article}
\usepackage{tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}
% Number of multicolumns here ↓ and ↓ here (source: https://tex.stackexchange.com/a/236156/134574)
\newcolumntype{D}{>{\hsize=\dimexpr2\hsize+2\tabcolsep+\arrayrulewidth\relax}C}
\begin{document}
\begin{table}
\caption{Caption.}
\centering
\begin{tabularx}{0.85\textwidth}{C|C|C|C|C|C}
\hline \hline
\multicolumn{2}{D|}{This is a very, very long Header 1} & \multicolumn{2}{D|}{Long Header 2} & \multicolumn{2}{D}{Long Header 3} \\
\hline
A & B & A & B & A & B \\
\hline \hline
\end{tabularx}
\end{table}
\end{document}

Edit 2:
I'm not proud of this one...
If you insist in one line, a more hacky version can be done using two tabularx's in the same table. You read it right, Jimmy, two!

\documentclass{article}
\usepackage{tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\newcolumntype{D}{>{\hsize=\dimexpr2\hsize+2\tabcolsep+\arrayrulewidth\relax}C}
\begin{document}
\begin{table}
\caption{Caption.}
\centering
\begin{tabularx}{0.5\textwidth}{C|C|}
\hline \hline
\multicolumn{2}{D|}{This is a very, very long Header 1}\\
\hline
A & B\\
\hline \hline
\end{tabularx}%
\begin{tabularx}{0.5\textwidth}{C|C|C|C}
\hline \hline
\multicolumn{2}{c|}{Long Header 2} & \multicolumn{2}{c}{Long Header 3} \\
\hline
A & B & A & B \\
\hline \hline
\end{tabularx}
\end{table}
\end{document}