In Depth

Read the manual for an in-depth discussion of all of the options available in the Gemfile and how to use them.
Gemfile manual

Gemfiles

Gemfiles require at least one gem source, in the form of the URL for a Rubygems server. Generate a Gemfile with the default rubygems.org source by running bundle init. If you can, use https so your connection to the rubygems.org server will be verified with SSL.
source 'https://rubygems.org'
Declare the gems that you need, including version numbers. Specify versions using the same syntax that Rubygems supports for dependencies.
gem 'nokogiri'
gem 'rails', '3.0.0.beta3'
gem 'rack',  '>=1.0'
gem 'thin',  '~>1.1'
Most of the version specifiers, like >= 1.0, are self-explanatory. The specifier ~> has a special meaning, best shown by example. ~> 2.0.3 is identical to >= 2.0.3 and < 2.1. ~> 2.1 is identical to >= 2.1 and < 3.0. ~> 2.2.beta will match prerelease versions like 2.2.beta.12.
Rubygems version specifiers
If a gem's main file is different than the gem name, specify how to require it.
gem 'rspec', :require => 'spec'
gem 'sqlite3'
Specify :require => false to prevent bundler from requiring the gem, but still install it and maintain dependencies.
gem 'rspec', :require => false
gem 'sqlite3'
In order to require gems in your Gemfile, you will need to call Bundler.require in your application.
Learn More: Bundler.require
Git repositories are also valid gem sources, as long as the repo contains one or more valid gems. Specify what to check out with :tag, :branch, or :ref. The default is the master branch.
gem 'nokogiri', :git => 'https://github.com/tenderlove/nokogiri.git', :branch => '1.4'
If the git repository does not contain a .gemspec file, bundler will create a simple one, without any dependencies, executables or C extensions. This may work for simple gems, but not work for others. If there is no .gemspec, you probably shouldn't use the gem from git.
Learn more: Git
If you would like to use a unpacked gem directly from the filesystem, simply set the :path option to the path containing the the gem's files.
gem 'extracted_library', :path => './vendor/extracted_library'
Dependencies can be placed into groups. Groups can be ignored at install-time (using --without) or required all at once (using Bundler.require).
gem 'wirble', :group => :development
gem 'debugger', :group => [:development, :test]

group :test do
  gem 'rspec'
end
Learn more: Groups
You can specify the required version of Ruby in the Gemfile with ruby. If the Gemfile is loaded on a different Ruby version, Bundler will raise an exception with an explanation.
ruby '1.9.3'
What this means is that this app has a dependency to a Ruby VM that is ABI compatible with 1.9.3. If the version check does not match, Bundler will raise an exception. This will ensure the running code matches. You can be more specific with the :engine and :engine_version options.
ruby '1.9.3', :engine => 'jruby', :engine_version => '1.6.7'
Learn More: Ruby Directive
Fork me on GitHub
Docs: v0.9 v1.0 v1.1 v1.2 v1.3 v1.5 v1.6 v1.7