Update: there's an easier solution with titlesec: the \thetitle command is
respectively \thesection, \thesubsection, etc. The default value in standard classes is:
\titlelabel{\thetitle\quad}
which means that after the number, an space of 1em is inserted; to change this behaviour is enough then to redefine \thetitle to add a dot and then a space:
\titlelabel{\thetitle.\ }
A complete example:
\documentclass{article}
\usepackage{titlesec}
\setcounter{secnumdepth}{5}% just for the example
\titlelabel{\thetitle.\ }
\begin{document}
\section{Test Section}
\subsection{Test Subsection}
\subsubsection{Test Subsubection}
\paragraph{Test Paragraph}
\subparagraph{Test Subparagraph}
\section*{Test Section}
\subsection*{Test Subsection}
\subsubsection*{Test Subsubection}
\paragraph*{Test Paragraph}
\subparagraph*{Test Subparagraph}
\end{document}

One possibility using the titlesec package affecting \section through \subparagraph:
\documentclass{article}
\usepackage[explicit]{titlesec}
\setcounter{secnumdepth}{5}% just for the example
\titleformat{\section}
{\normalfont\Large\bfseries}{\thesection.}{0em}{~#1}
\titleformat{name=\section,numberless}
{\normalfont\Large\bfseries}{}{0em}{#1}
\titleformat{\subsection}
{\normalfont\large\bfseries}{\thesubsection.}{0em}{~#1}
\titleformat{name=\subsection,numberless}
{\normalfont\large\bfseries}{}{0em}{#1}
\titleformat{\subsubsection}
{\normalfont\normalsize\bfseries}{\thesubsubsection.}{0em}{~#1}
\titleformat{name=\subsubsection,numberless}
{\normalfont\normalsize\bfseries}{}{0em}{#1}
\titleformat{\paragraph}[runin]
{\normalfont\normalsize\bfseries}{\theparagraph.}{0em}{~#1}
\titleformat{name=\paragraph,numberless}[runin]
{\normalfont\normalsize\bfseries}{}{0em}{#1}
\titleformat{\subparagraph}[runin]
{\normalfont\normalsize\bfseries}{\thesubparagraph.}{0em}{~#1}
\titleformat{name=\subparagraph,numberless}[runin]
{\normalfont\normalsize\bfseries}{}{0em}{#1}
\begin{document}
\section{Test Section}
\subsection{Test Subsection}
\subsubsection{Test Subsubection}
\paragraph{Test Paragraph}
\subparagraph{Test Subparagraph}
\end{document}
I can't upload images; will do it later.