Do we clearly know what the living closest relative of the dinosaurs are? And connected to the first question, in scientific manner how do we know these relationship between extinct species and living ones?
In general the answer is always the same: you construct a phylogenetic tree. In order to locate different species on this tree in relation to each other, you use various features to compare which species are more similar to each other than others.
The best way of doing this is by comparing their DNA sequence, especially orthologous genes (i.e. genes common to the species compared).
Unfortunately, genetic sequences usually aren’t available for extinct species. You can still compare homologous features though. For instance, the class of mammals are all characterised by the possession of mammary glands. Similarly, all vertebrates have a vertebral column and all aves are feathered, warm-blooded, egg-laying vertebrates.
The collection of many such features from fossile records allows the creation of more or less detailed phylogenies. The Wikipedia explanation mentions several transitional fossil forms which trace the evolution from dinosaurs to modern birds via several intermediates. All of the inferences are based on anatomical resemblance.
This may sound weak evidence but in fact anatomical homology has proved to be sufficiently accurate in constructing other phylogenies, where we have been able to verify the correctness using genome comparison data. So while there is much uncertainty about the precise branching point of birds from dinosaurs (or maybe archosaurs), there is near-certainty that the common ancestor of birds and dinosaurs was, in fact, an archosaur.
Extending Konrad Rudolph's answer, research has been conducted into reconstructing the phylogenetic tree via protein sequence data of the T. rex (one of the latest living dinosaurs):
C. L. Organ et al, Molecular Phylogenetics of Mastodon and Tyrannosaurus rex, Science 320 (2008), p. 499.
They use a variety of standard methods for the phylogenetic analysis. The real challenge was collecting protein sequence data for the T. rex (which has been extinct for ~65 million years). They succeeded in collecting and sequencing collagen α1(I) from Mastodon and T. rex, and compared it to the same protein in extant species.
Despite missing sequence data, the mastodon groups with elephant and the T. rex groups with birds, consistent with predictions based on genetic and morphological data for mastodon and on morphological data for T. rex.
This is an old question, with two highly-upvoted answers (one of which was accepted), but still there is an issue in both answers: both of them fail to explain that birds are not related to dinosaurs. Instead, birds are dinosaurs.
In this cladogram, all organisms from the dinosaurs node up are dinosaurs. Look at the birds in the top right corner.
That's quite well known for anybody familiar with phylogenetic systematics: "Dinosauria" is a monophyletic group that include birds (the purple clade in the image below).
According to University of California (Understanding Evolution):
Another cool thing about phylogenetic classification is that it means that dinosaurs are not entirely extinct. Birds are, in fact, dinosaurs (part of the clade Dinosauria). It's pretty neat to think that you could learn something about T. rex by studying birds!
Thus, technically speaking, the living close relatives to dinosaurs are crocodilians. Birds are not the living close relatives to dinosaurs because birds are dinosaurs.